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>
This commit is contained in:
Ben Osheroff 2020-08-21 13:35:46 -07:00 committed by GitHub
parent 6a18ee911e
commit c56e0a95a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 9 deletions

View file

@ -30,7 +30,8 @@ var (
notifier *notifications.Notifier
timeout time.Duration
lifecycleHooks bool
scope string
rollingRestart bool
scope string
)
var rootCmd = &cobra.Command{
@ -91,6 +92,7 @@ func PreRun(cmd *cobra.Command, args []string) {
enableLabel, _ = f.GetBool("label-enable")
lifecycleHooks, _ = f.GetBool("enable-lifecycle-hooks")
rollingRestart, _ = f.GetBool("rolling-restart")
scope, _ = f.GetString("scope")
log.Debug(scope)
@ -211,6 +213,7 @@ func runUpdatesWithNotifications(filter t.Filter) {
Timeout: timeout,
MonitorOnly: monitorOnly,
LifecycleHooks: lifecycleHooks,
RollingRestart: rollingRestart,
}
err := actions.Update(client, updateParams)
if err != nil {