From a5113f4368bfa4386b0be1bb48dd2e32b9a41c7c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 3 Oct 2017 11:30:45 +0200 Subject: [PATCH] Add output for "secrets" and "configs" on stack deploy When deploying a stack from a compose file, the output did not show that a secret or config was created. This patch adds messages for these. Create a configuration file and compose file: $ cat > config.yml < secret.txt < docker-compose.yml < --- cli/command/stack/deploy_composefile.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/command/stack/deploy_composefile.go b/cli/command/stack/deploy_composefile.go index e511a6f127..d08db5a5f8 100644 --- a/cli/command/stack/deploy_composefile.go +++ b/cli/command/stack/deploy_composefile.go @@ -224,6 +224,7 @@ func createSecrets( } case apiclient.IsErrSecretNotFound(err): // secret does not exist, then we create a new one. + fmt.Fprintf(dockerCli.Out(), "Creating secret %s\n", secretSpec.Name) if _, err := client.SecretCreate(ctx, secretSpec); err != nil { return errors.Wrapf(err, "failed to create secret %s", secretSpec.Name) } @@ -251,6 +252,7 @@ func createConfigs( } case apiclient.IsErrConfigNotFound(err): // config does not exist, then we create a new one. + fmt.Fprintf(dockerCli.Out(), "Creating config %s\n", configSpec.Name) if _, err := client.ConfigCreate(ctx, configSpec); err != nil { errors.Wrapf(err, "failed to create config %s", configSpec.Name) }