Commit Graph

24 Commits (e983beb52a48810ce650368468c81c44bda7c595)

Author SHA1 Message Date
nils måsén e983beb52a
fix: gracefully skip pinned images (#1277)
* move client args to opts struct
* gracefully skip pinned images
* replace newClientNoAPI with literals
2 years ago
nils måsén 47a640b764
update dependencies (sane go.mod) (#1061) 3 years ago
nils måsén 697397f289
feat(log): add context fields to lifecycle events (#1007) 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 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
nils måsén 6a9d985ce7
feat(log): use short image/container IDs in logs (#888) 3 years ago
Turtle Kalus 5983d58d7c
Log based on registry known-support - reduce noise on notifications (#716)
Log based on registry known-poor support of HEAD in checking container
manifest.

Some private registries do not support HEAD (E.G. GitLab Container Registry).
With the current config, this log message is causing a notification to be
sent for each container hosted in a registry lacking HEAD support.

log.Debug or log.Warning for failed HTTP HEAD-check based on registry hostname
where HEAD-check is known to fail.

For Docker Hub, a failed HEAD leading to a "regular pull" may count against a
user's call-quota whereas other registry implementations do not support HEAD,
or whose container manifest may be in a different location.
3 years ago
Simon Aronsson 8b81fbd48d
Revert "feat(config): swap viper and cobra for config (#684)"
This reverts commit ff8cb884a0.
3 years ago
nils måsén ff8cb884a0
feat(config): swap viper and cobra for config (#684) 3 years ago
rg9400 9ac1bf6ca2
fix typo (#702) 4 years ago
Simon Aronsson cb62b16369
add http head based digest comparison to avoid dockerhub rate limits 4 years ago
yrien30 2842b97df3
Allow watchtower to update rebooting containers (#651)
Co-authored-by: nils måsén <nils@piksel.se>
Co-authored-by: Simon Aronsson <simme@arcticbit.se>
4 years ago
nils måsén 64d48b70c2
fix: return nil imageinfo when retrieve fails (#680) 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
Sebastiaan Tammer 6da66fb312
Image of running container no longer needed locally (#571) 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 4 years ago
Simon Aronsson 7b8b8e8ad9 #387 fix: switch to image id map and add additional tests 4 years ago
Zois Pagoulatos 2d8507ca31 Add --revive-stopped flag to start stopped containers after an update (#403)
* Add --revive-stopped flag to start stopped containers after an update

* Update arguments.md
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 874180a518 fix: resolve merge issues 5 years ago
Simon Aronsson e4e1127f8e fix: remove linting issues 5 years ago
Simon Aronsson 74ce92760c refactor: move container into pkg 5 years ago