From 5246d1a20e9a9d418f196ae70653db2ea1f4f809 Mon Sep 17 00:00:00 2001 From: Max H <10329648+8ear@users.noreply.github.com> Date: Wed, 9 Oct 2019 09:18:39 +0200 Subject: [PATCH 01/30] Update email.go Added SubjectTag as variable --- pkg/notifications/email.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/notifications/email.go b/pkg/notifications/email.go index b5ef979..ef6b3d7 100644 --- a/pkg/notifications/email.go +++ b/pkg/notifications/email.go @@ -24,7 +24,7 @@ const ( // We work around that by holding on to log entries until the update cycle is done. type emailTypeNotifier struct { From, To string - Server, User, Password string + Server, User, Password, SubjectTag string Port int tlsSkipVerify bool entries []*log.Entry @@ -43,6 +43,7 @@ func newEmailNotifier(c *cobra.Command, acceptedLogLevels []log.Level) t.Notifie port, _ := flags.GetInt("notification-email-server-port") tlsSkipVerify, _ := flags.GetBool("notification-email-server-tls-skip-verify") delay, _ := flags.GetInt("notification-email-delay") + subjecttag, _ := flags.GetInt("notification-email-subjecttag") n := &emailTypeNotifier{ From: from, @@ -54,6 +55,7 @@ func newEmailNotifier(c *cobra.Command, acceptedLogLevels []log.Level) t.Notifie tlsSkipVerify: tlsSkipVerify, logLevels: acceptedLogLevels, delay: time.Duration(delay) * time.Second, + SubjectTag: subjecttag, } log.AddHook(n) @@ -62,7 +64,11 @@ func newEmailNotifier(c *cobra.Command, acceptedLogLevels []log.Level) t.Notifie } func (e *emailTypeNotifier) buildMessage(entries []*log.Entry) []byte { - emailSubject := "Watchtower updates" + if SubjectTag == nil { + emailSubject := "Watchtower updates" + } else { + emailSubject := SubjectTag + " Watchtower updates" + } if hostname, err := os.Hostname(); err == nil { emailSubject += " on " + hostname } From 220dc5add45173558fd655a13bf90419ebd4dec7 Mon Sep 17 00:00:00 2001 From: Max H <10329648+8ear@users.noreply.github.com> Date: Wed, 9 Oct 2019 09:20:07 +0200 Subject: [PATCH 02/30] Update email.go --- pkg/notifications/email.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/notifications/email.go b/pkg/notifications/email.go index ef6b3d7..fdc8fee 100644 --- a/pkg/notifications/email.go +++ b/pkg/notifications/email.go @@ -43,7 +43,7 @@ func newEmailNotifier(c *cobra.Command, acceptedLogLevels []log.Level) t.Notifie port, _ := flags.GetInt("notification-email-server-port") tlsSkipVerify, _ := flags.GetBool("notification-email-server-tls-skip-verify") delay, _ := flags.GetInt("notification-email-delay") - subjecttag, _ := flags.GetInt("notification-email-subjecttag") + subjecttag, _ := flags.GetString("notification-email-subjecttag") n := &emailTypeNotifier{ From: from, From 505a5ec71577ec3a3bb742fafece703ea73e01dd Mon Sep 17 00:00:00 2001 From: Max H <10329648+8ear@users.noreply.github.com> Date: Wed, 9 Oct 2019 09:25:24 +0200 Subject: [PATCH 03/30] Update email.go --- pkg/notifications/email.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/notifications/email.go b/pkg/notifications/email.go index fdc8fee..7fb1500 100644 --- a/pkg/notifications/email.go +++ b/pkg/notifications/email.go @@ -64,6 +64,9 @@ func newEmailNotifier(c *cobra.Command, acceptedLogLevels []log.Level) t.Notifie } func (e *emailTypeNotifier) buildMessage(entries []*log.Entry) []byte { + // If variable SubjectTag is empty define emailSubject as "Watchtower updates". + // If variable SubjectTag is set define emailSubject as "$SubjectTag Watchtower updates" + // For example: SubjectTag=[Server Munich] -> "[Server Munich] Watchtower updates ..." if SubjectTag == nil { emailSubject := "Watchtower updates" } else { From fd2a006c6bf8024e3cc69825da38cdb0fb7ca0d9 Mon Sep 17 00:00:00 2001 From: Max H <10329648+8ear@users.noreply.github.com> Date: Tue, 15 Oct 2019 16:41:40 +0200 Subject: [PATCH 04/30] Update email.go --- pkg/notifications/email.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/notifications/email.go b/pkg/notifications/email.go index 7fb1500..4916d40 100644 --- a/pkg/notifications/email.go +++ b/pkg/notifications/email.go @@ -64,10 +64,7 @@ func newEmailNotifier(c *cobra.Command, acceptedLogLevels []log.Level) t.Notifie } func (e *emailTypeNotifier) buildMessage(entries []*log.Entry) []byte { - // If variable SubjectTag is empty define emailSubject as "Watchtower updates". - // If variable SubjectTag is set define emailSubject as "$SubjectTag Watchtower updates" - // For example: SubjectTag=[Server Munich] -> "[Server Munich] Watchtower updates ..." - if SubjectTag == nil { + if SubjectTag == "" { emailSubject := "Watchtower updates" } else { emailSubject := SubjectTag + " Watchtower updates" From 6840a8c3cf2678f7937d75530b0661b7932c345a Mon Sep 17 00:00:00 2001 From: Max H <10329648+8ear@users.noreply.github.com> Date: Tue, 15 Oct 2019 16:48:58 +0200 Subject: [PATCH 05/30] Update flags.go --- internal/flags/flags.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/internal/flags/flags.go b/internal/flags/flags.go index 6e9ea55..971afa6 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -146,7 +146,7 @@ func RegisterNotificationFlags(rootCmd *cobra.Command) { "", viper.GetInt("WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT"), "SMTP server port to send notification emails through") - + flags.BoolP( "notification-email-server-tls-skip-verify", "", @@ -168,6 +168,12 @@ Should only be used for testing. viper.GetString("WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD"), "SMTP server password for sending notifications") + flags.StringP( + "notification-email-subjecttag", + "", + viper.GetString("WATCHTOWER_NOTIFICATION_EMAIL_SUBJECTTAG"), + "Subject prefix tag for notifications via mail") + flags.StringP( "notification-slack-hook-url", "", @@ -232,6 +238,7 @@ func SetDefaults() { viper.SetDefault("WATCHTOWER_NOTIFICATIONS", []string{}) viper.SetDefault("WATCHTOWER_NOTIFICATIONS_LEVEL", "info") viper.SetDefault("WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT", 25) + viper.SetDefault("WATCHTOWER_NOTIFICATION_EMAIL_SUBJECTTAG", "") viper.SetDefault("WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER", "watchtower") } From 9198f8972befe6f78075f5d652ef0cb5d7ed1d5d Mon Sep 17 00:00:00 2001 From: Max H <10329648+8ear@users.noreply.github.com> Date: Tue, 15 Oct 2019 16:51:13 +0200 Subject: [PATCH 06/30] Update flags.go --- internal/flags/flags.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/flags/flags.go b/internal/flags/flags.go index 971afa6..b2f9187 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -146,7 +146,7 @@ func RegisterNotificationFlags(rootCmd *cobra.Command) { "", viper.GetInt("WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT"), "SMTP server port to send notification emails through") - + flags.BoolP( "notification-email-server-tls-skip-verify", "", From 81540bcb59eff56c43acc91ddaf1d4b261b489e2 Mon Sep 17 00:00:00 2001 From: foxbit19 Date: Tue, 29 Oct 2019 21:26:50 +0100 Subject: [PATCH 07/30] Insert nota bene about docker-compose into notification doc page (#392) --- docs/notifications.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/notifications.md b/docs/notifications.md index 5741566..2f6d7ff 100644 --- a/docs/notifications.md +++ b/docs/notifications.md @@ -9,6 +9,11 @@ The types of notifications to send are passed via the comma-separated option `-- - `msteams` to send notifications via MSTeams webhook - `gotify` to send notifications via Gotify + +> If you're a `docker-compose` user, make sure to specify environment variables' values in your `.yml` file without double quotes (`"`). +> +> This prevents unexpected errors when watchtower starts. + ## Settings - `--notifications-level` (env. `WATCHTOWER_NOTIFICATIONS_LEVEL`): Controls the log level which is used for the notifications. If omitted, the default log level is `info`. Possible values are: `panic`, `fatal`, `error`, `warn`, `info` or `debug`. From d53eed08cda6d968cc8f7320d77de23796516cf1 Mon Sep 17 00:00:00 2001 From: Jungkook Park Date: Tue, 12 Nov 2019 14:59:07 +0900 Subject: [PATCH 08/30] docs: add missing arguments * add a missing argument --no--restart * add a missing env variable name for argument --debug --- docs/arguments.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/arguments.md b/docs/arguments.md index db51c95..5072730 100644 --- a/docs/arguments.md +++ b/docs/arguments.md @@ -62,7 +62,7 @@ Enable debug mode with verbose logging. ``` Argument: --debug -Environment Variable: N/A +Environment Variable: WATCHTOWER_DEBUG Type: Boolean Default: false ``` @@ -127,6 +127,16 @@ Environment Variable: WATCHTOWER_MONITOR_ONLY Default: false ``` +## Without restarting containers +Do not restart containers after updating. This option can be useful when the start of the containers +is managed by an external system such as systemd. +``` + Argument: --no-restart +Environment Variable: WATCHTOWER_NO_RESTART + Type: Boolean + Default: false +``` + ## Without pulling new images Do not pull new images. When this flag is specified, watchtower will not attempt to pull new images from the registry. Instead it will only monitor the local image cache for changes. From 63e50491608e990fe9d8565145f9a8ae7a252b6b Mon Sep 17 00:00:00 2001 From: Zois Pagoulatos Date: Wed, 13 Nov 2019 11:09:54 +0100 Subject: [PATCH 09/30] Add lifecycle hooks to documentation nav (#401) Add lifecycle hooks to documentation nav --- mkdocs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 9656c6d..e5e7c34 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -19,5 +19,6 @@ nav: - 'Remote hosts': 'remote-hosts.md' - 'Secure connections': 'secure-connections.md' - 'Stop signals': 'stop-signals.md' + - 'Lifecycle hooks': 'lifecycle-hooks.md' plugins: - - search \ No newline at end of file + - search From 2d8507ca313a3d726798cb07ac21e86ca4a79ab2 Mon Sep 17 00:00:00 2001 From: Zois Pagoulatos Date: Wed, 13 Nov 2019 11:16:37 +0100 Subject: [PATCH 10/30] 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 --- cmd/root.go | 2 ++ docs/arguments.md | 10 ++++++++++ internal/flags/flags.go | 8 +++++++- pkg/container/client.go | 6 ++++-- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index ea00786..453196a 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -93,11 +93,13 @@ func PreRun(cmd *cobra.Command, args []string) { noPull, _ := f.GetBool("no-pull") includeStopped, _ := f.GetBool("include-stopped") + reviveStopped, _ := f.GetBool("revive-stopped") removeVolumes, _ := f.GetBool("remove-volumes") client = container.NewClient( !noPull, includeStopped, + reviveStopped, removeVolumes, ) diff --git a/docs/arguments.md b/docs/arguments.md index db51c95..dc2c0ee 100644 --- a/docs/arguments.md +++ b/docs/arguments.md @@ -97,6 +97,16 @@ Environment Variable: WATCHTOWER_INCLUDE_STOPPED Default: false ``` +## Revive stopped +Start any stopped containers that have had their image updated. This argument is only usable with the `--include-stopped` argument. + +``` + Argument: --revive-stopped +Environment Variable: WATCHTOWER_REVIVE_STOPPED + Type: Boolean + Default: false +``` + ## Poll interval Poll interval (in seconds). This value controls how frequently watchtower will poll for new images. diff --git a/internal/flags/flags.go b/internal/flags/flags.go index 6e9ea55..a8f330b 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -94,6 +94,12 @@ func RegisterSystemFlags(rootCmd *cobra.Command) { viper.GetBool("WATCHTOWER_INCLUDE_STOPPED"), "Will also include created and exited containers") + flags.BoolP( + "revive-stopped", + "", + viper.GetBool("WATCHTOWER_REVIVE_STOPPED"), + "Will also start stopped containers that were updated, if include-stopped is active") + flags.BoolP( "enable-lifecycle-hooks", "", @@ -128,7 +134,7 @@ func RegisterNotificationFlags(rootCmd *cobra.Command) { "", viper.GetString("WATCHTOWER_NOTIFICATION_EMAIL_TO"), "Address to send notification emails to") - + flags.IntP( "notification-email-delay", "", diff --git a/pkg/container/client.go b/pkg/container/client.go index 0dc22db..5877eb4 100644 --- a/pkg/container/client.go +++ b/pkg/container/client.go @@ -38,7 +38,7 @@ type Client interface { // * DOCKER_HOST the docker-engine host to send api requests to // * DOCKER_TLS_VERIFY whether to verify tls certificates // * DOCKER_API_VERSION the minimum docker api version to work with -func NewClient(pullImages bool, includeStopped bool, removeVolumes bool) Client { +func NewClient(pullImages bool, includeStopped bool, reviveStopped bool, removeVolumes bool) Client { cli, err := dockerclient.NewClientWithOpts(dockerclient.FromEnv) if err != nil { @@ -50,6 +50,7 @@ func NewClient(pullImages bool, includeStopped bool, removeVolumes bool) Client pullImages: pullImages, removeVolumes: removeVolumes, includeStopped: includeStopped, + reviveStopped: reviveStopped, } } @@ -58,6 +59,7 @@ type dockerClient struct { pullImages bool removeVolumes bool includeStopped bool + reviveStopped bool } func (client dockerClient) ListContainers(fn t.Filter) ([]Container, error) { @@ -203,7 +205,7 @@ func (client dockerClient) StartContainer(c Container) (string, error) { } - if !c.IsRunning() { + if !c.IsRunning() && !client.reviveStopped { return createdContainer.ID, nil } From 8b2eda7bdf126fa202eb2b57c8fbd1a4b5287c4c Mon Sep 17 00:00:00 2001 From: Simon Aronsson Date: Sun, 17 Nov 2019 11:09:14 +0100 Subject: [PATCH 11/30] Update notifications.md --- docs/notifications.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/notifications.md b/docs/notifications.md index 5741566..22da93e 100644 --- a/docs/notifications.md +++ b/docs/notifications.md @@ -27,6 +27,7 @@ To receive notifications by email, the following command-line options, or their - `--notification-email-server-user` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER`): The username to authenticate with the SMTP server with. - `--notification-email-server-password` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD`): The password to authenticate with the SMTP server with. - `--notification-email-delay` (env. `WATCHTOWER_NOTIFICATION_EMAIL_DELAY`): Delay before sending notifications expressed in seconds. +- `--notification-email-subjecttag` (env. `WATCHTOWER_NOTIFICATION_EMAIL_SUBJECTTAG`): Prefix to include in the subject tag. Useful when running multiple watchtowers. Example: From 24902964016e7bdbd7ad569128415547db2a281b Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sun, 17 Nov 2019 10:10:46 +0000 Subject: [PATCH 12/30] docs: update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3fbe043..af5f345 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Kaloyan Raev
Kaloyan Raev

πŸ’» ⚠️ sixth
sixth

πŸ“– Gina HΓ€ußge
Gina HÀußge

πŸ’» + Max H.
Max H.

πŸ’» From 288f8c68ceabc02d02c0668b5f3ac586640d8abb Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sun, 17 Nov 2019 10:10:47 +0000 Subject: [PATCH 13/30] docs: update .all-contributorsrc --- .all-contributorsrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index f0f4374..ab949c6 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -375,6 +375,15 @@ "contributions": [ "code" ] + }, + { + "login": "8ear", + "name": "Max H.", + "avatar_url": "https://avatars0.githubusercontent.com/u/10329648?v=4", + "profile": "https://github.com/8ear", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, From 91447853f48546d4191c238836a08c3bfe88bdf1 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sun, 17 Nov 2019 10:12:05 +0000 Subject: [PATCH 14/30] docs: update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index af5f345..eb53ce9 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d sixth
sixth

πŸ“– Gina HΓ€ußge
Gina HÀußge

πŸ’» Max H.
Max H.

πŸ’» + Jungkook Park
Jungkook Park

πŸ“– From c1a096a616660df2c9627d999e15c6cb9453059a Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sun, 17 Nov 2019 10:12:06 +0000 Subject: [PATCH 15/30] docs: update .all-contributorsrc --- .all-contributorsrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index ab949c6..dfaa6e3 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -384,6 +384,15 @@ "contributions": [ "code" ] + }, + { + "login": "pjknkda", + "name": "Jungkook Park", + "avatar_url": "https://avatars0.githubusercontent.com/u/4986524?v=4", + "profile": "https://pjknkda.github.io", + "contributions": [ + "doc" + ] } ], "contributorsPerLine": 7, From ea596ea74746d811b64effe45d9e260509854db5 Mon Sep 17 00:00:00 2001 From: Simon Aronsson Date: Sun, 17 Nov 2019 11:19:57 +0100 Subject: [PATCH 16/30] fix some var ref errors --- go.mod | 1 - internal/flags/flags.go | 2 +- pkg/notifications/email.go | 22 ++++++++++++---------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 1690237..b5be153 100644 --- a/go.mod +++ b/go.mod @@ -59,7 +59,6 @@ require ( golang.org/x/crypto v0.0.0-20190403202508-8e1b8d32e692 golang.org/x/net v0.0.0-20190522155817-f3200d17e092 golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e - google.golang.org/appengine v1.4.0 // indirect google.golang.org/genproto v0.0.0-20190401181712-f467c93bbac2 google.golang.org/grpc v1.21.0 gotest.tools v2.2.0+incompatible // indirect diff --git a/internal/flags/flags.go b/internal/flags/flags.go index 3f3d8fc..7ab09bd 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -179,7 +179,7 @@ Should only be used for testing. "", viper.GetString("WATCHTOWER_NOTIFICATION_EMAIL_SUBJECTTAG"), "Subject prefix tag for notifications via mail") - + flags.StringP( "notification-slack-hook-url", "", diff --git a/pkg/notifications/email.go b/pkg/notifications/email.go index 4916d40..ca54499 100644 --- a/pkg/notifications/email.go +++ b/pkg/notifications/email.go @@ -23,13 +23,13 @@ const ( // - It would only send errors // We work around that by holding on to log entries until the update cycle is done. type emailTypeNotifier struct { - From, To string + From, To string Server, User, Password, SubjectTag string - Port int - tlsSkipVerify bool - entries []*log.Entry - logLevels []log.Level - delay time.Duration + Port int + tlsSkipVerify bool + entries []*log.Entry + logLevels []log.Level + delay time.Duration } func newEmailNotifier(c *cobra.Command, acceptedLogLevels []log.Level) t.Notifier { @@ -64,10 +64,12 @@ func newEmailNotifier(c *cobra.Command, acceptedLogLevels []log.Level) t.Notifie } func (e *emailTypeNotifier) buildMessage(entries []*log.Entry) []byte { - if SubjectTag == "" { - emailSubject := "Watchtower updates" + var emailSubject string + + if e.SubjectTag == "" { + emailSubject = "Watchtower updates" } else { - emailSubject := SubjectTag + " Watchtower updates" + emailSubject = e.SubjectTag + " Watchtower updates" } if hostname, err := os.Hostname(); err == nil { emailSubject += " on " + hostname @@ -134,7 +136,7 @@ func (e *emailTypeNotifier) SendNotification() { time.Sleep(e.delay) } - e.sendEntries(e.entries) + e.sendEntries(e.entries) e.entries = nil } From 341d1b0ba1bfbc43eb50b0862916d701cac178f0 Mon Sep 17 00:00:00 2001 From: Simon Aronsson Date: Sun, 24 Nov 2019 14:44:57 +0100 Subject: [PATCH 17/30] Greet new reporters and contributors using actions Replaces the welcome bot --- .github/workflows/greetings.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/greetings.yml diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 0000000..a3a88df --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,25 @@ +name: Greetings + +on: [pull_request, issues] + +jobs: + greeting: + runs-on: ubuntu-latest + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: > + Hi there! πŸ‘‹πŸΌ + As you're new to this repo, we'd like to suggest that you read our [code of conduct](https://github.com/containrrr/watchtower/blob/master/CODE_OF_CONDUCT.md) + as well as our [contribution guidelines](https://github.com/containrrr/watchtower/blob/master/CONTRIBUTING.md). + \n + Thanks a bunch for opening your first issue! πŸ™ + pr-message: > + Congratulations on opening your first pull request! πŸ₯³\n\n + To make sure that your pull request is handled as fast as possible, we recommend that you make sure that you make sure that you've done the following\:\n + [ ] Documentation has been updated + [ ] Tests have been added to all appropriate places + [ ] Changes adhere to our [contribution guidelines](https://github.com/containrrr/watchtower/blob/master/CONTRIBUTING.md) + + Thanks! πŸ™πŸΌ From 3464ddaf19835a3e75f0fe94d43d32767be12a94 Mon Sep 17 00:00:00 2001 From: Simon Aronsson Date: Sun, 24 Nov 2019 14:52:42 +0100 Subject: [PATCH 18/30] Update greetings.yml --- .github/workflows/greetings.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index a3a88df..7034c9e 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -13,13 +13,6 @@ jobs: Hi there! πŸ‘‹πŸΌ As you're new to this repo, we'd like to suggest that you read our [code of conduct](https://github.com/containrrr/watchtower/blob/master/CODE_OF_CONDUCT.md) as well as our [contribution guidelines](https://github.com/containrrr/watchtower/blob/master/CONTRIBUTING.md). - \n Thanks a bunch for opening your first issue! πŸ™ pr-message: > - Congratulations on opening your first pull request! πŸ₯³\n\n - To make sure that your pull request is handled as fast as possible, we recommend that you make sure that you make sure that you've done the following\:\n - [ ] Documentation has been updated - [ ] Tests have been added to all appropriate places - [ ] Changes adhere to our [contribution guidelines](https://github.com/containrrr/watchtower/blob/master/CONTRIBUTING.md) - - Thanks! πŸ™πŸΌ + Congratulations on opening your first pull request! We'll get back to you as soon as possible. In the meantime, please make sure you've updated the documentation to reflect your changes and have added test automation as needed. Thanks! πŸ™πŸΌ From 8c9741022c6829610fe96a19caafbc5fcd137c05 Mon Sep 17 00:00:00 2001 From: Simon Aronsson Date: Sun, 24 Nov 2019 14:53:42 +0100 Subject: [PATCH 19/30] remove welcome bot config --- .github/config.yml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .github/config.yml diff --git a/.github/config.yml b/.github/config.yml deleted file mode 100644 index 62993b5..0000000 --- a/.github/config.yml +++ /dev/null @@ -1,11 +0,0 @@ -newIssueWelcomeComment: > - Hi there! - - Thanks a bunch for opening your first issue! :pray: - As you're new to this repo, we'd like to suggest that you read our [code of conduct](https://github.com/containrrr/watchtower/blob/master/CODE_OF_CONDUCT.md) - -newPRWelcomeComment: > - Thanks for opening this pull request! Please check out our [contributing guidelines](https://github.com/containrrr/watchtower/blob/master/CONTRIBUTING.md) as well as our [code of conduct](https://github.com/containrrr/watchtower/blob/master/CODE_OF_CONDUCT.md). - -firstPRMergeComment: > - Congrats on merging your first pull request! We are all very proud of you! :sparkles: From 68a6903685ba54052ee92da9dc016edef9debbff Mon Sep 17 00:00:00 2001 From: Simon Aronsson Date: Tue, 26 Nov 2019 19:35:24 +0100 Subject: [PATCH 20/30] Update notifications.md --- docs/notifications.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/notifications.md b/docs/notifications.md index 404c4b7..a731855 100644 --- a/docs/notifications.md +++ b/docs/notifications.md @@ -2,7 +2,7 @@ # Notifications Watchtower can send notifications when containers are updated. Notifications are sent via hooks in the logging system, [logrus](http://github.com/sirupsen/logrus). -The types of notifications to send are passed via the comma-separated option `--notifications` (or corresponding environment variable `WATCHTOWER_NOTIFICATIONS`), which has the following valid values: +The types of notifications to send are passed via the space-separated option `--notifications` (or corresponding environment variable `WATCHTOWER_NOTIFICATIONS`), which has the following valid values: - `email` to send notifications via e-mail - `slack` to send notifications through a Slack webhook From 9389e8f34ff33a05daa044249987b380575cf291 Mon Sep 17 00:00:00 2001 From: Simon Aronsson Date: Tue, 26 Nov 2019 19:39:55 +0100 Subject: [PATCH 21/30] update instruction on multiple notifications closes #412 --- docs/notifications.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/notifications.md b/docs/notifications.md index a731855..b95e95e 100644 --- a/docs/notifications.md +++ b/docs/notifications.md @@ -2,13 +2,14 @@ # Notifications Watchtower can send notifications when containers are updated. Notifications are sent via hooks in the logging system, [logrus](http://github.com/sirupsen/logrus). -The types of notifications to send are passed via the space-separated option `--notifications` (or corresponding environment variable `WATCHTOWER_NOTIFICATIONS`), which has the following valid values: +The types of notifications to send are set by passing a comma-separated list of values to the `--notifications` option (or corresponding environment variable `WATCHTOWER_NOTIFICATIONS`), which has the following valid values: - `email` to send notifications via e-mail - `slack` to send notifications through a Slack webhook - `msteams` to send notifications via MSTeams webhook - `gotify` to send notifications via Gotify +> There is currently a [bug](https://github.com/spf13/viper/issues/380) in Viper, which prevents comma-separated slices to be used when using the environment variable. A workaround is available where we instead put quotes around the environment variable value and replace the commas with spaces, as `WATCHTOWER_NOTIFICATIONS="slack msteams"` > If you're a `docker-compose` user, make sure to specify environment variables' values in your `.yml` file without double quotes (`"`). > From 0784aa5e49a0446b61bd88cff15f1fca0f9d4576 Mon Sep 17 00:00:00 2001 From: Jan Nidzwetzki Date: Wed, 25 Dec 2019 10:40:35 +0100 Subject: [PATCH 22/30] Fixed wrong filename in documentation --- docs/credential-helpers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/credential-helpers.md b/docs/credential-helpers.md index 1722906..165a9cd 100644 --- a/docs/credential-helpers.md +++ b/docs/credential-helpers.md @@ -45,7 +45,7 @@ volumes: helper: {} ``` -and for `.docker/config.yml`: +and for `.docker/config.json`: ```yaml { "HttpHeaders" : { @@ -61,4 +61,4 @@ and for `.docker/config.yml`: "index.docker.io": "osxkeychain" // ...or your prefered helper } } -``` \ No newline at end of file +``` From 3b8305985fda16e03d580df8539cbb4b9b91cf96 Mon Sep 17 00:00:00 2001 From: Jan Nidzwetzki Date: Wed, 25 Dec 2019 10:47:57 +0100 Subject: [PATCH 23/30] Added full path to config file --- docs/credential-helpers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/credential-helpers.md b/docs/credential-helpers.md index 165a9cd..d1869e1 100644 --- a/docs/credential-helpers.md +++ b/docs/credential-helpers.md @@ -45,7 +45,7 @@ volumes: helper: {} ``` -and for `.docker/config.json`: +and for `/.docker/config.json`: ```yaml { "HttpHeaders" : { From 35be6ce37f1458facbe59ca78e602cfa4865b159 Mon Sep 17 00:00:00 2001 From: Jan Nidzwetzki Date: Wed, 25 Dec 2019 13:29:38 +0100 Subject: [PATCH 24/30] Changed codeblock language --- docs/credential-helpers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/credential-helpers.md b/docs/credential-helpers.md index d1869e1..719d11e 100644 --- a/docs/credential-helpers.md +++ b/docs/credential-helpers.md @@ -46,7 +46,7 @@ volumes: ``` and for `/.docker/config.json`: -```yaml +```json { "HttpHeaders" : { "User-Agent" : "Docker-Client/19.03.1 (XXXXXX)" From f28093e0eabcc09de3baf909547e5004343a2700 Mon Sep 17 00:00:00 2001 From: Jan Kristof Nidzwetzki Date: Wed, 25 Dec 2019 13:32:39 +0100 Subject: [PATCH 25/30] Update credential-helpers.md --- docs/credential-helpers.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/credential-helpers.md b/docs/credential-helpers.md index 719d11e..cca9e92 100644 --- a/docs/credential-helpers.md +++ b/docs/credential-helpers.md @@ -51,14 +51,16 @@ and for `/.docker/config.json`: "HttpHeaders" : { "User-Agent" : "Docker-Client/19.03.1 (XXXXXX)" }, - "credsStore" : "osxkeychain", // ...or your prefered helper + "credsStore" : "osxkeychain", "auths" : { "xyzxyzxyz.dkr.ecr.eu-north-1.amazonaws.com" : {}, "https://index.docker.io/v1/": {} }, "credHelpers": { "xyzxyzxyz.dkr.ecr.eu-north-1.amazonaws.com" : "ecr-login", - "index.docker.io": "osxkeychain" // ...or your prefered helper + "index.docker.io": "osxkeychain" } } ``` + +*Note:* `osxkeychain` can be changed to your prefered credentials helper From 893fd035dd3ae479c5006b1babcbc0926d3b70fd Mon Sep 17 00:00:00 2001 From: Jan Nidzwetzki Date: Wed, 25 Dec 2019 13:37:48 +0100 Subject: [PATCH 26/30] Fixed small typo --- docs/credential-helpers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/credential-helpers.md b/docs/credential-helpers.md index cca9e92..c86ef7c 100644 --- a/docs/credential-helpers.md +++ b/docs/credential-helpers.md @@ -63,4 +63,4 @@ and for `/.docker/config.json`: } ``` -*Note:* `osxkeychain` can be changed to your prefered credentials helper +*Note:* `osxkeychain` can be changed to your prefered credentials helper. From 32f70bd9af65ec3d4fb7cb0cbe6348f398bcc8ed Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 25 Dec 2019 12:41:04 +0000 Subject: [PATCH 27/30] docs: update README.md [skip ci] --- README.md | 92 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 49 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index eb53ce9..558764c 100644 --- a/README.md +++ b/README.md @@ -62,64 +62,70 @@ The full documentation is available at https://containrrr.github.io/watchtower. Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): - + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + + + +
James
James

⚠️ πŸ€”
Florian
Florian

πŸ‘€ πŸ“–
Brian DeHamer
Brian DeHamer

πŸ’» 🚧
Ross Cadogan
Ross Cadogan

πŸ’»
stffabi
stffabi

πŸ’» 🚧
Austin
Austin

πŸ“–
David Gardner
David Gardner

πŸ‘€ πŸ“–

James

⚠️ πŸ€”

Florian

πŸ‘€ πŸ“–

Brian DeHamer

πŸ’» 🚧

Ross Cadogan

πŸ’»

stffabi

πŸ’» 🚧

Austin

πŸ“–

David Gardner

πŸ‘€ πŸ“–
Tanguy ⧓ Herrmann
Tanguy ⧓ Herrmann

πŸ’»
Rodrigo Damazio Bovendorp
Rodrigo Damazio Bovendorp

πŸ’» πŸ“–
Ryan Kuba
Ryan Kuba

πŸš‡
cnrmck
cnrmck

πŸ“–
Harry Walter
Harry Walter

πŸ’»
Robotex
Robotex

πŸ“–
Gerald Pape
Gerald Pape

πŸ“–

Tanguy ⧓ Herrmann

πŸ’»

Rodrigo Damazio Bovendorp

πŸ’» πŸ“–

Ryan Kuba

πŸš‡

cnrmck

πŸ“–

Harry Walter

πŸ’»

Robotex

πŸ“–

Gerald Pape

πŸ“–
fomk
fomk

πŸ’»
Sven Gottwald
Sven Gottwald

πŸš‡
techknowlogick
techknowlogick

πŸ’»
waja
waja

πŸ“–
Scott Albertson
Scott Albertson

πŸ“–
Jason Huddleston
Jason Huddleston

πŸ“–
Napster
Napster

πŸ’»

fomk

πŸ’»

Sven Gottwald

πŸš‡

techknowlogick

πŸ’»

waja

πŸ“–

Scott Albertson

πŸ“–

Jason Huddleston

πŸ“–

Napster

πŸ’»
Maxim
Maxim

πŸ’» πŸ“–
Max Schmitt
Max Schmitt

πŸ“–
cron410
cron410

πŸ“–
Paulo Henrique
Paulo Henrique

πŸ“–
Kaleb Elwert
Kaleb Elwert

πŸ“–
Bill Butler
Bill Butler

πŸ“–
Mario Tacke
Mario Tacke

πŸ’»

Maxim

πŸ’» πŸ“–

Max Schmitt

πŸ“–

cron410

πŸ“–

Paulo Henrique

πŸ“–

Kaleb Elwert

πŸ“–

Bill Butler

πŸ“–

Mario Tacke

πŸ’»
Mark Woodbridge
Mark Woodbridge

πŸ’»
Simon Aronsson
Simon Aronsson

πŸ’» 🚧 πŸ‘€
Ansem93
Ansem93

πŸ“–
Luka Peschke
Luka Peschke

πŸ’» πŸ“–
Zois Pagoulatos
Zois Pagoulatos

πŸ’»
Alexandre Menif
Alexandre Menif

πŸ’»
Andrey
Andrey

πŸ“–

Mark Woodbridge

πŸ’»

Simon Aronsson

πŸ’» 🚧 πŸ‘€

Ansem93

πŸ“–

Luka Peschke

πŸ’» πŸ“–

Zois Pagoulatos

πŸ’»

Alexandre Menif

πŸ’»

Andrey

πŸ“–
Armando LΓΌscher
Armando LΓΌscher

πŸ“–
Ryan Budke
Ryan Budke

πŸ“–
Kaloyan Raev
Kaloyan Raev

πŸ’» ⚠️
sixth
sixth

πŸ“–
Gina HÀußge
Gina HÀußge

πŸ’»
Max H.
Max H.

πŸ’»
Jungkook Park
Jungkook Park

πŸ“–

Armando LΓΌscher

πŸ“–

Ryan Budke

πŸ“–

Kaloyan Raev

πŸ’» ⚠️

sixth

πŸ“–

Gina HÀußge

πŸ’»

Max H.

πŸ’»

Jungkook Park

πŸ“–

Jan Kristof Nidzwetzki

πŸ“–
+ + This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! From e5a1814b7e816b061f9ba495b42b18de466b3296 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 25 Dec 2019 12:41:05 +0000 Subject: [PATCH 28/30] docs: update .all-contributorsrc [skip ci] --- .all-contributorsrc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index dfaa6e3..f24430c 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -393,6 +393,15 @@ "contributions": [ "doc" ] + }, + { + "login": "jnidzwetzki", + "name": "Jan Kristof Nidzwetzki", + "avatar_url": "https://avatars1.githubusercontent.com/u/5753622?v=4", + "profile": "https://achfrag.net", + "contributions": [ + "doc" + ] } ], "contributorsPerLine": 7, @@ -400,5 +409,6 @@ "projectOwner": "containrrr", "repoType": "github", "repoHost": "https://github.com", - "commitConvention": "none" + "commitConvention": "none", + "skipCi": true } From a447175adb3e9246ceae36da7c6c1340743af2f8 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 25 Dec 2019 12:41:55 +0000 Subject: [PATCH 29/30] docs: update README.md [skip ci] --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b34aec..9c18264 100644 --- a/README.md +++ b/README.md @@ -59,9 +59,55 @@ The full documentation is available at https://containrrr.github.io/watchtower. Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): - -
James
James

⚠️ πŸ€”
Florian
Florian

πŸ‘€ πŸ“–
Brian DeHamer
Brian DeHamer

πŸ’» 🚧
Ross Cadogan
Ross Cadogan

πŸ’»
stffabi
stffabi

πŸ’» 🚧
Austin
Austin

πŸ“–
David Gardner
David Gardner

πŸ‘€ πŸ“–
Tanguy ⧓ Herrmann
Tanguy ⧓ Herrmann

πŸ’»
Rodrigo Damazio Bovendorp
Rodrigo Damazio Bovendorp

πŸ’» πŸ“–
Ryan Kuba
Ryan Kuba

πŸš‡
cnrmck
cnrmck

πŸ“–
Harry Walter
Harry Walter

πŸ’»
Robotex
Robotex

πŸ“–
Gerald Pape
Gerald Pape

πŸ“–
fomk
fomk

πŸ’»
Sven Gottwald
Sven Gottwald

πŸš‡
techknowlogick
techknowlogick

πŸ’»
waja
waja

πŸ“–
Scott Albertson
Scott Albertson

πŸ“–
Jason Huddleston
Jason Huddleston

πŸ“–
Napster
Napster

πŸ’»
Maxim
Maxim

πŸ’» πŸ“–
Max Schmitt
Max Schmitt

πŸ“–
cron410
cron410

πŸ“–
Paulo Henrique
Paulo Henrique

πŸ“–
Kaleb Elwert
Kaleb Elwert

πŸ“–
Bill Butler
Bill Butler

πŸ“–
Mario Tacke
Mario Tacke

πŸ’»
Mark Woodbridge
Mark Woodbridge

πŸ’»
Simon Aronsson
Simon Aronsson

πŸ’» 🚧 πŸ‘€
Ansem93
Ansem93

πŸ“–
Zois Pagoulatos
Zois Pagoulatos

πŸ’»
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

James

⚠️ πŸ€”

Florian

πŸ‘€ πŸ“–

Brian DeHamer

πŸ’» 🚧

Ross Cadogan

πŸ’»

stffabi

πŸ’» 🚧

Austin

πŸ“–

David Gardner

πŸ‘€ πŸ“–

Tanguy ⧓ Herrmann

πŸ’»

Rodrigo Damazio Bovendorp

πŸ’» πŸ“–

Ryan Kuba

πŸš‡

cnrmck

πŸ“–

Harry Walter

πŸ’»

Robotex

πŸ“–

Gerald Pape

πŸ“–

fomk

πŸ’»

Sven Gottwald

πŸš‡

techknowlogick

πŸ’»

waja

πŸ“–

Scott Albertson

πŸ“–

Jason Huddleston

πŸ“–

Napster

πŸ’»

Maxim

πŸ’» πŸ“–

Max Schmitt

πŸ“–

cron410

πŸ“–

Paulo Henrique

πŸ“–

Kaleb Elwert

πŸ“–

Bill Butler

πŸ“–

Mario Tacke

πŸ’»

Mark Woodbridge

πŸ’»

Simon Aronsson

πŸ’» 🚧 πŸ‘€

Ansem93

πŸ“–

Zois Pagoulatos

πŸ’» πŸ‘€
+ + This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! From dee5cb1c542cfffff8bb8c4fe7223f5514894e79 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Wed, 25 Dec 2019 12:41:56 +0000 Subject: [PATCH 30/30] docs: update .all-contributorsrc [skip ci] --- .all-contributorsrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index f57ce74..45af97f 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -299,7 +299,8 @@ "avatar_url": "https://avatars0.githubusercontent.com/u/21138205?v=4", "profile": "https://github.com/zoispag", "contributions": [ - "code" + "code", + "review" ] } ], @@ -308,5 +309,6 @@ "projectOwner": "containrrr", "repoType": "github", "repoHost": "https://github.com", - "commitConvention": "none" + "commitConvention": "none", + "skipCi": true }