Commit Graph

37 Commits (3e4b26957da85634fa3a54f7ec8593df444f8d5e)

Author SHA1 Message Date
nils måsén e9c83af533
fix: correctly handle non-stale restarts (#1220) 2 years ago
nils måsén 084249c5fc
fix: linked/depends-on container restarting (#1103) 2 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
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
3 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>
3 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>
3 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
3 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
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
nils måsén 4d17cf1a29
fix cleanup for rolling updates (#706) 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
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
Alexander Voronin 45c9dcc779
Increases stopContainer timeout to 10min (#528)
That means the update timeout until now has been 1 second, as that's the sleep duration of the timeout checker.
This commit changes it to 10 actual minutes.
4 years ago
Victor Moura 006c4210fa
Increases stopContainer timeout from 60 seconds to 10min (#526) 4 years ago
Simon Aronsson 4672811983 fix linting and formatting 4 years ago
Simon Aronsson 98c60d7441 fix some errors and clean up 4 years ago
Simon Aronsson c1a0da9a9d feature/367 fix: skip container if pre-update command fails 4 years ago
Simon Aronsson 1d3ffc728d fix: update mock client for tests 4 years ago
Simon Aronsson 1d1c630f7a feat: add timeout override for pre-update lifecycle hook 4 years ago
Simon Aronsson d1abce889a refactor: extract code from the container package 5 years ago
Simon Aronsson 8aad258408 #387 fix: add comments to pass linting 5 years ago
Simon Aronsson 7b8b8e8ad9 #387 fix: switch to image id map and add additional tests 5 years ago
Lukas Elsner fa1b8d5d0c proper set implementation 5 years ago
Lukas Elsner a2a62fb46e do not delete same image twice when cleaning up 5 years ago
Niklas Wigertz Danielsson 135467dcf6 add pre/post update check lifecycle hooks (#373)
* add pre/post update check lifecycle hooks

* update docs for lifecycle hooks

* Fix phrasing
5 years ago
sixth bea8b9228f Update check.go (#370) 5 years ago
Simon Aronsson bfae38dbf8
Feat/lifecycle hooks (#351)
* feat(update): add lifecycle hooks to the update action

* fix(ci): add bash tests for lifecycle-hooks to the ci workflow

* fix(ci): move integration tests to an isolated step

* fix(ci): fix malformed all-contributors json

* fix(ci): disable automatic bash test until we figure out a reasonable way to run it in circleci
5 years ago
Simon Aronsson e4e1127f8e fix: remove linting issues 5 years ago
Simon Aronsson 6c507433e8 refactor: split out more code into separate files 5 years ago
Simon Aronsson a425bf1024 refactor: move actions into internal 5 years ago