Commit Graph

94 Commits (74f70382a38d24ee3bd28b3762758cf625ac45be)

Author SHA1 Message Date
nils måsén 7fbdd2f49b
chore(deps): bump go/stdlib to v1.20.x (#1850) 1 year ago
nils måsén a047c7f9ff
fix: instance cleanup without scope (#1836) 1 year ago
Rodrigo Damazio Bovendorp 623f4e67fb
feat(filters): Add a flag/env to explicitly exclude containers by name (#1784) 1 year ago
bugficks 8e3bde7e0b
feat: add --health-check command line switch (#1725)
Co-authored-by: nils måsén <nils@piksel.se>
1 year ago
Arsène Fougerouse 79ebad0e19
feat: allow logging output to use JSON formatter (#1705)
Co-authored-by: nils måsén <nils@piksel.se>
1 year ago
jebabin 650acde015
feat: add a label take precedence argument (#1754)
Co-authored-by: nils måsén <nils@piksel.se>
1 year ago
nils måsén 1d5a8d9a4c
test: check flag/docs consistency (#1770) 1 year ago
nils måsén 9f60766692
feat: enabled loading http-api-token from file (#1728) 1 year ago
nils måsén 139f67270b
test(flags): ensure temp files are cleaned up (#1727) 1 year ago
nils måsén 0a5bd54fb7
feat(clean): log removed/untagged images (#1466) 2 years ago
nils måsén dd1ec09668
fix: always use container interface (#1516) 2 years ago
nils måsén 9470bf81c5
fix: always add missing slashes to link names (#1588) 2 years ago
Matthew McNeely 0fddbfb7ed
feat: allow log level to be set to any level (#1345)
Co-authored-by: nils måsén <nils@piksel.se>
2 years ago
nils måsén f047d75dcc
fix(flags): detect schedule set from env (#1373) 2 years ago
Jauder Ho e04a107694
chore(deps): update go version to 1.18 (#1363)
Co-authored-by: nils måsén <nils@piksel.se>
2 years ago
nils måsén 7900471f88
feat: add porcelain output (#1337)
* feat: add porcaline output

* feat(du-cli): add create-stale action

add create-stale action

Signed-off-by: nils måsén

* test(flags): add alias tests

* fix stray format string ref

* fix shell liniting problems

* feat(du-cli): remove created images

* add test for common template

* fix interval/schedule logic

* use porcelain arg as template version

* fix editor save artifacts

* use simpler v1 template

Signed-off-by: nils måsén
2 years ago
James Laska bd2adf6e5f
Support secrets for notification_url (#1300)
Co-authored-by: nils måsén <nils@piksel.se>
2 years ago
nils måsén 56368a7207
fix: testing for flag files on windows (#1249)
* fix: testing for flag files on windows
* fix build script on windows/msys
3 years ago
nils måsén 2f4d58776d
fix(notifications): title customization (#1219) 3 years ago
nils måsén e9c83af533
fix: correctly handle non-stale restarts (#1220) 3 years ago
lazou a5c60a9fe6
feat(notifications): add general notification delay (#1246) 3 years ago
nils måsén 084249c5fc
fix: linked/depends-on container restarting (#1103) 3 years ago
Dimas Yudha P c0fd77d357
fixing flags usage text to first capital letter. (#1102)
Co-authored-by: dimas <dimas.prawira@mncgroup.com>
3 years ago
nils måsén 2c8695683d test: reduce test output noise 3 years ago
nils måsén ec43ecedc4 test: remove unused cross package dependency on mock api server 3 years ago
nils måsén 9bb8991a76
fix(digest): check container image info for nil (#1027) 3 years ago
nils måsén e3dd8d688a
Session report collection and report templates (#981)
* wip: notification stats

* make report notifications optional

* linting/documentation fixes

* linting/documentation fixes

* merge types.Container and container.Interface

* smaller naming/format fixes

* use typed image/container IDs

* simplify notifier and update tests

* add missed doc comments

* lint fixes

* remove unused constructors

* rename old/new current/latest
3 years ago
yrien30 145fe6dbcb
Pre-update lifecycle hook (#793)
* Make watchtower skip update if pre-update lifecycle hook exits with a non-zero exit code
#649

* Make watchtower skip update if pre-update lifecycle hook exits with a non-zero exit code
#649

* Make watchtower skip update if pre-update lifecycle hook exits with a non-zero exit code
#649

* Make watchtower skip update if pre-update lifecycle hook exits with a non-zero exit code
#649

* Make watchtower skip update if pre-update lifecycle hook exits with a non-zero exit code #649

* Make watchtower skip update if pre-update lifecycle hook exits with a non-zero exit code #649

* Make watchtower skip update if pre-update lifecycle hook exits with a non-zero exit code #649

* Prevent starting new container if old one is not stopped because of lifecycle hook.

* Add null check for c.containerInfo.State in IsRunning

* Fixed that the container would not start

* Added test for preupdate

* EX_TEMPFAIL -> ExTempFail

* Added missing fuction ouput names

* Skip preupdate when container is restarting.
3 years ago
Amir Zarrinkafsh dc12a1ac7f
feat: allow hostname override for notifiers (#994)
* feat: allow hostname override for email notifier

As it currently stands all notifiers utilise `os.Hostname` to populate their titles/subjects.

When utilising Docker with a bridged network if you set the hostname for a container to an external DNS hostname Docker's internal DNS resolver will override said hostname for all containers within the bridged network.

This change allows a user to specify what hostname should be represented in the email notifications without having to change the `os.Hostname`.

* feat: allow custom hostname for all notifiers

* docs: adjust notification hostname flag
3 years ago
nils måsén f508c92ae0
* feat: custom user agent (#990)
* fix: move build meta to own package
  this allows it to be referenced from other packages without causing a cyclic dependency
* feat: custom user agent
3 years ago
DasSkelett 6b155a111a
Allow running periodic updates with enabled HTTP API (#916)
* Allow running periodic updates with enabled HTTP API

* Add --http-api-periodic-polls to docs
4 years ago
nils måsén 12467712a1
feat: check container config before update (#925)
* feat: check container config before restart
* fix: only skip when hostconfig and config differ
* fix: update test mocks to not fail tests
* test: add verify config tests
4 years ago
nils måsén d38e52b5c6
fix: merge artifacts and broken shoutrrr tests (#929)
* test: add missing container test suite
* fix broken tests
* fix: remove duplicate merge artifact

Co-authored-by: Simon Aronsson <simme@arcticbit.se>
4 years ago
nils måsén b4cf17d33f
feat: make head pull failure warning toggleable (#912)
* feat: make head pull failure warning toggleable

* expect prometheus tests to go through EVENTUALLY

* wait for queue to be empty before checking test conditions

* clean up new head failure toggle

* fixup! clean up new head failure toggle

* test: add registry tests

* test: add warn on head failure tests

* fix client interface and make tests hit more lines

* make all tests use NewClient instead of creating a struct pointer

* fix lint issues

Co-authored-by: Simon Aronsson <simme@arcticbit.se>
4 years ago
Simon Aronsson 3de202a965
fix depends on behavior and simplify some of its logic (#908)
* fix depends on behavior and simplify some of its logic

* fix comments
4 years ago
nils måsén 40ab6fd5ba
Fix notifications and old instance cleanup (#748)
Co-authored-by: Simon Aronsson <simme@arcticbit.se>
4 years ago
ilike2burnthing e230967196
Add WATCHTOWER_INCLUDE_RESTARTING env for include-restarting flag (#720) 4 years ago
Simon Aronsson d7d5b25882
Prometheus support (#450)
Co-authored-by: nils måsén <nils@piksel.se>
Co-authored-by: MihailITPlace <ya.halo-halo@yandex.ru>
Co-authored-by: Sebastiaan Tammer <sebastiaantammer@gmail.com>
4 years ago
Simon Aronsson 8b81fbd48d
Revert "feat(config): swap viper and cobra for config (#684)"
This reverts commit ff8cb884a0.
4 years ago
nils måsén ff8cb884a0
feat(config): swap viper and cobra for config (#684) 4 years ago
nils måsén 4d17cf1a29
fix cleanup for rolling updates (#706) 4 years ago
nils måsén 33b4957d07
fix default interval to be the intended value (#700)
Co-authored-by: Simon Aronsson <simme@arcticbit.se>
4 years ago
Simon Aronsson 023919e0fd
actually fix it 4 years ago
Simon Aronsson f697870ed5
fix erroneous poll interval change 4 years ago
Simon Aronsson cb62b16369
add http head based digest comparison to avoid dockerhub rate limits 4 years ago
David H bde421be0d
Monitor-only for individual containers (#652)
* Add monitor-only label

* Add tests for monitor-only

* Treat missing monitor-only label as if the option was set to false

* Add docs for container-based monitor-only

* Add function doc

* Fix monitor-only logic
4 years ago
bugficks 158b6935d4
Disabling color through environment variables (#598)
* This patch adds support for disabling color through environment variables.
- NO_COLOR: https://no-color.org/
- CLICOLOR,CLICOLOR_FORCE: https://bixense.com/clicolors/ ( [logrus built-in](6699a89a23/text_formatter.go (L46)) )

* use viper/cobra and add documentation. (https://github.com/containrrr/watchtower/pull/598#pullrequestreview-463814669)

Co-authored-by: Simon Aronsson <simme@arcticbit.se>
4 years ago
Ben Osheroff c56e0a95a7
Rolling restart (#619)
* implement rolling restart functionality

bouncing each image individually can ensure that a group of docker
containers launched with docker-compose can stay 100% up during deploy.

* move rolling restart into a function

* honor params.Cleanup

Co-authored-by: Simon Aronsson <simme@arcticbit.se>
4 years ago
Victor Moura 6a18ee911e
Adds scopeUID config to enable multiple instances of Watchtower (#511)
* Adds scopeUID config to enable multiple instances of Watchtower

* Adds tests for multiple instance support with scopeuid

* Adds docs on scope monitoring and multiple instance support

* Adds multiple instances docs to mkdocs config file

* Changes multiple instances check and refactors naming for scope feature

* Applies linter suggestions

* Fixes documentation on Watchtower monitoring scope
4 years ago
nils måsén 5efb249a86
Skip updating containers where no local image info can be retrieved (#612)
* Revert "Image of running container no longer needed locally (#571)"

This reverts commit 6da66fb312.

* Update client.go

* fix: skip updating when no image info can be retrieved

This will allow watchtower to continue even though the image info for a
container cannot be retrieved. If this happens one warning will be emitted
and the container will be skipped, unless NoRestart or OnlyMonitor is supplied
4 years ago