Commit Graph

151 Commits

Author SHA1 Message Date
nils måsén a42eb28f39 fix broken tests 2024-01-06 14:50:53 +01:00
nils måsén a6949dede9 refactor(update): clean up actions/update
- move common arguments to a shared struct
- remove unused fields
- fix outdated names
- improve logging/error handling
2024-01-05 23:00:08 +01:00
nils måsén cb8e86d705 fix(container): rename Stale to MarkedForUpdate
renames the container.Stale field to what it's actually used for, as staleness
is not the only factor used to decide whether a container should be updated anymore

also hides the private field along with linkedToRestarting
2024-01-05 19:24:11 +01:00
nils måsén 023c1a7d93 fix(lifecycle): cleanup lifecycle
- removes unwieldy SkipUpdate return value in favor of errors.Is
- generalizes the code for all four phases
- allows timeout to be defined for all phases
- enables explicit unit in timeout label values (in addition to implicit minutes)
2024-01-05 19:17:11 +01:00
nils måsén 097df11000 feat(docs): add linking and output messages (#1831) 2023-11-11 14:57:21 +01:00
nils måsén 48539c4faf fix: set nopull param from args (#1830) 2023-11-11 14:50:43 +01:00
nils måsén c4d493881d fix: handle missing healthcheck keys in config (#1810) 2023-10-23 10:31:07 +02:00
nils måsén dd54055143 feat: add support for "none" scope (#1800) 2023-10-21 20:57:58 +02:00
nils måsén 40b8c77100 fix: use new healthcheck config if not overridden (#1801) 2023-10-21 20:57:33 +02:00
donuts-are-good 72e437f173 chore: replace usages of ioutil (#1792) 2023-10-14 10:57:22 +02:00
dependabot[bot] 1754dd185d chore(deps): bump github.com/docker/distribution from 2.8.2+incompatible to 2.8.3+incompatible (#1780)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: nils måsén <nils@piksel.se>
2023-10-04 12:17:38 +02: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
nils måsén 9180e9558e feat(docs): add template preview (#1777) 2023-10-02 16:11:04 +02:00
nils måsén 897b1714d0 fix: only remove container id network aliases (#1724) 2023-09-16 17:16:08 +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
guangwu e8affe3fef fix: received typo (#1765)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-09-13 10:14:29 +02:00
Tentoe 30280e38b4 fix(notifications): correctly set the delay from options (#1726)
Co-authored-by: Tentoe <tentoe86@pm.me>
2023-08-12 14:16:40 +02:00
schizo99 dca45f50cb feat: support container network mode (#1429)
Co-authored-by: nils måsén <nils@piksel.se>
Co-authored-by: Andreas Åhman <andreas.ahman@ingka.ikea.com>
2023-08-08 18:32:44 +02:00
Simon Aronsson bba9b2b100 fix: empty out the aliases on recreation (#1699)
* fix: empty out the aliases on recreation

* test alias purging
2023-07-28 15:20:22 +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
Reinier van der Leer 25fdb40312 fix(registry): image name parsing behavior (#1526)
Co-authored-by: nils måsén <nils@piksel.se>
2023-04-12 17:15:12 +02:00
nils måsén cfcbcac8b0 fix: remove logging of credentials (#1534) 2023-04-12 08:22:52 +02:00
nils måsén 4d661bf63b fix(registry): ignore empty challenge fields (#1626)
Co-authored-by: caotian <caotian@users.noreply.github.com>
2023-04-12 08:18:00 +02:00
dependabot[bot] df1b86bc29 chore(deps): bump docker/docker from 20.10.23+inc to 23.0.2+inc (#1612)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: nils måsén <nils@piksel.se>
2023-04-10 13:22:06 +02:00
nils måsén 9470bf81c5 fix: always add missing slashes to link names (#1588) 2023-03-12 10:57:55 +01:00
Gilbert Gilb's bbbe04119c feat: add no-pull label for containers (#1574)
Co-authored-by: Nedžad Alibegović <nedzad@nedzad.dev>
Co-authored-by: nils måsén <nils@piksel.se>
2023-03-12 10:07:24 +01:00
nils måsén 264046d5f9 feat: update shoutrrr to v0.7 (#1543) 2023-01-29 17:30:08 +01:00
nils måsén 547d033460 feat(notifications): add json template (#1542) 2023-01-29 17:10:18 +01:00
nils måsén 14b235a542 feat: add oci image index support (#1533) 2023-01-22 09:59:42 +01:00
nothub 3190ce2df1 feat: ignore removal error due to non-existing containers (#1481)
Co-authored-by: nils måsén <nils@piksel.se>
Fixes https://github.com/containrrr/watchtower/issues/1480
2022-12-06 17:40:26 +01:00
nils måsén a4d00bfd75 test: refactor/simplify container mock builders (#1495) 2022-12-06 16:28:20 +01:00
nils måsén cb555f539d preparations for soft deprecation of legacy notification args (#1377)
Co-authored-by: Simon Aronsson <simme@arcticbit.se>
2022-11-01 00:00:00 +01: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
dependabot[bot] 063e7247b9 chore(deps): bump github.com/onsi/gomega from 1.10.3 to 1.20.0 (#1360)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: nils måsén <nils@piksel.se>
2022-08-24 09:03:06 +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
Mateusz Drab a429c373ff feat: regex container name filtering (#1241)
* Allow container name regex filtering

* make regex names backwards compatible

Co-authored-by: Mateusz Drab <mateuszd@mpd.pw>
Co-authored-by: nils måsén <nils@piksel.se>
2022-08-14 10:08:45 +02:00
Brian Choromanski 489356aa42 fix(notifications): include icon in slack legacy url (#1303) 2022-08-01 18:40:12 +02:00
Dirk Kok 739f328ee5 feat(http): optional query parameter to update only containers of a specified image (#1289)
* feat(http): optional query parameter to update only containers of a specified image

* fix style issues

* comma separated image parameter

* Support comma-separated query parameter as well as specifying it multiple times

Co-authored-by: nils måsén <nils@piksel.se>

* fixed compile error

* fixed FilterByImageTag

Not sure what changed in my testing setup, but Docker reports image names including the tag name now.

* consistent use of image/tag (use image)

* fixed multiple image queries

* assuming I'm right here, only block on lock when any images are specified.

* add unit tests for image filter. didn't add tests for update api because they didn't already exist

* whoops.

* use ImageName instead, add unit test for empty ImageName filter.

Co-authored-by: nils måsén <nils@piksel.se>
2022-06-14 09:13:14 +02:00
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
2022-05-27 12:16:18 +02:00
nils måsén 2f4d58776d fix(notifications): title customization (#1219) 2022-04-18 19:37:13 +02:00
lazou a5c60a9fe6 feat(notifications): add general notification delay (#1246) 2022-03-09 11:03:06 +01:00
nils måsén be33c64afd fix: move invalid token to log field (#1171)
* fix: move invalid token to log field

* escape invalid token in log field

* Update pkg/api/api.go

Co-authored-by: Simon Aronsson <simme@arcticbit.se>
2022-01-22 17:50:04 +01:00
nils måsén 04db93c770 fix: add missing portmap when needed (#1183) 2022-01-22 17:40:37 +01:00
nils måsén aa02d8d31b feat(notifications): add title field to template data (#1125) 2022-01-05 12:08:47 +01:00
nils måsén 1d59fb83dd feat(notifications): support delayed sending (#1142) 2022-01-05 09:31:01 +01:00
Juho-Pekka Kuitunen e14cc292ed feat: improve HTTP API logging, honor no-startup-message (#1091)
Co-authored-by: nils måsén <nils@piksel.se>
2021-11-29 15:07:26 +01:00
Patrice b4a225c8bb Post update time out (#1124)
* adding post update timeout option

* removing extra word
2021-11-18 14:54:35 +01:00
nils måsén 782529ddbd feat: improve session result logging (#1123)
- logs the session result as an info level message without notification instead of debug
- does not log that no notification was sent if there are no notifications enabled
2021-11-18 14:08:38 +01:00
Jeremy L. Morris d9d6f794a1 feat: use a more specific error type for no container info (#1115)
Co-authored-by: Jeremy L. Morris <jmorris@digitalocean.com>
2021-11-12 12:21:34 +01:00