Commit graph

94 commits

Author SHA1 Message Date
nils måsén
7fbdd2f49b
chore(deps): bump go/stdlib to v1.20.x (#1850) 2023-11-13 14:31:45 +01:00
nils måsén
a047c7f9ff
fix: instance cleanup without scope (#1836) 2023-11-11 17:12:06 +01:00
Rodrigo Damazio Bovendorp
623f4e67fb
feat(filters): Add a flag/env to explicitly exclude containers by name (#1784) 2023-10-04 10:44:52 +02:00
bugficks
8e3bde7e0b
feat: add --health-check command line switch (#1725)
Co-authored-by: nils måsén <nils@piksel.se>
2023-09-16 21:10:00 +02:00
Arsène Fougerouse
79ebad0e19
feat: allow logging output to use JSON formatter (#1705)
Co-authored-by: nils måsén <nils@piksel.se>
2023-09-16 17:23:26 +02:00
jebabin
650acde015
feat: add a label take precedence argument (#1754)
Co-authored-by: nils måsén <nils@piksel.se>
2023-09-16 17:13:41 +02:00
nils måsén
1d5a8d9a4c
test: check flag/docs consistency (#1770) 2023-09-16 17:04:44 +02:00
nils måsén
9f60766692
feat: enabled loading http-api-token from file (#1728) 2023-08-12 19:19:08 +02:00
nils måsén
139f67270b
test(flags): ensure temp files are cleaned up (#1727) 2023-08-12 18:49:19 +02:00
nils måsén
0a5bd54fb7
feat(clean): log removed/untagged images (#1466) 2023-04-15 12:56:51 +02:00
nils måsén
dd1ec09668
fix: always use container interface (#1516) 2023-04-12 17:36:01 +02:00
nils måsén
9470bf81c5
fix: always add missing slashes to link names (#1588) 2023-03-12 10:57:55 +01:00
Matthew McNeely
0fddbfb7ed
feat: allow log level to be set to any level (#1345)
Co-authored-by: nils måsén <nils@piksel.se>
2022-09-17 12:12:24 +02:00
nils måsén
f047d75dcc
fix(flags): detect schedule set from env (#1373) 2022-09-04 20:05:13 +02:00
Jauder Ho
e04a107694
chore(deps): update go version to 1.18 (#1363)
Co-authored-by: nils måsén <nils@piksel.se>
2022-09-04 13:56:29 +02:00
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
2022-08-14 10:11:31 +02:00
James Laska
bd2adf6e5f
Support secrets for notification_url (#1300)
Co-authored-by: nils måsén <nils@piksel.se>
2022-08-01 20:10:36 +02:00
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
2022-04-18 19:38:19 +02:00
nils måsén
2f4d58776d
fix(notifications): title customization (#1219) 2022-04-18 19:37:13 +02:00
nils måsén
e9c83af533
fix: correctly handle non-stale restarts (#1220) 2022-04-18 19:36:38 +02:00
lazou
a5c60a9fe6
feat(notifications): add general notification delay (#1246) 2022-03-09 11:03:06 +01:00
nils måsén
084249c5fc
fix: linked/depends-on container restarting (#1103) 2022-01-11 17:15:22 +01:00
Dimas Yudha P
c0fd77d357
fixing flags usage text to first capital letter. (#1102)
Co-authored-by: dimas <dimas.prawira@mncgroup.com>
2021-11-08 10:29:44 +01:00
nils måsén
2c8695683d test: reduce test output noise 2021-11-01 19:36:38 +01:00
nils måsén
ec43ecedc4 test: remove unused cross package dependency on mock api server 2021-11-01 19:35:45 +01:00
nils måsén
9bb8991a76
fix(digest): check container image info for nil (#1027) 2021-07-25 12:44:29 +02:00
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
2021-06-27 09:05:01 +02:00
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.
2021-06-24 00:36:33 +02:00
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
2021-06-24 00:29:20 +02:00
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
2021-06-11 19:23:00 +02:00
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
2021-04-27 22:18:45 +02:00
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
2021-04-24 18:29:05 +02:00
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>
2021-04-24 15:42:31 +02:00
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>
2021-04-23 16:34:21 +02:00
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
2021-04-18 18:37:35 +02:00
nils måsén
40ab6fd5ba
Fix notifications and old instance cleanup (#748)
Co-authored-by: Simon Aronsson <simme@arcticbit.se>
2021-01-10 11:12:54 +01:00
ilike2burnthing
e230967196
Add WATCHTOWER_INCLUDE_RESTARTING env for include-restarting flag (#720) 2021-01-06 22:34:58 +01:00
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>
2021-01-06 22:28:32 +01:00
Simon Aronsson
8b81fbd48d
Revert "feat(config): swap viper and cobra for config (#684)"
This reverts commit ff8cb884a0.
2020-12-21 23:08:23 +01:00
nils måsén
ff8cb884a0
feat(config): swap viper and cobra for config (#684) 2020-12-21 15:17:45 +01:00
nils måsén
4d17cf1a29
fix cleanup for rolling updates (#706) 2020-12-20 18:16:32 +01:00
nils måsén
33b4957d07
fix default interval to be the intended value (#700)
Co-authored-by: Simon Aronsson <simme@arcticbit.se>
2020-12-07 20:09:43 +01:00
Simon Aronsson
023919e0fd
actually fix it 2020-12-07 20:04:11 +01:00
Simon Aronsson
f697870ed5
fix erroneous poll interval change 2020-12-07 20:01:26 +01:00
Simon Aronsson
cb62b16369
add http head based digest comparison to avoid dockerhub rate limits 2020-12-06 13:21:04 +01:00
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
2020-10-03 22:00:02 +02:00
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>
2020-08-21 22:54:16 +02:00
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>
2020-08-21 22:35:46 +02:00
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
2020-08-21 20:13:47 +02:00
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
2020-08-18 20:55:35 +02:00