* 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
* 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
* 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 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
* see if moving ubuntu out of the matrix solves test issue
Co-authored-by: nils måsén <nils@piksel.se>
* 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>
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.
* 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
* 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>
* 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
* 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
The life-cycle messages should not have the same level as the update messages.
Why?
I receive a (mail-) notification for every run even if no image is changed:
```
2020-07-31 06:44:33 (info): Executing pre-check command.
```
But I only want to receive a notification if something changed:
```
2020-07-20 06:44:44 (info): Found new traefik:v2.2 image (sha256:7c992081f52423e325bd12debf0edcb4f7cfa398683c26f99c00112ec14e1ab9)
```
* Added string functions for lowercase, uppercase and capitalize to shoutrrr templates
* Update pkg/notifications/shoutrrr.go
Co-authored-by: nils måsén <nils@piksel.se>
* Update pkg/notifications/shoutrrr.go
Co-authored-by: nils måsén <nils@piksel.se>
* Update pkg/notifications/shoutrrr.go
Co-authored-by: nils måsén <nils@piksel.se>
* Update pkg/notifications/shoutrrr_test.go
Co-authored-by: nils måsén <nils@piksel.se>
* escape quotation marks in test
Co-authored-by: nils måsén <nils@piksel.se>