Merge pull request #593 from thaJeztah/add-create-output

Add output for "secrets" and "configs" on stack deploy
This commit is contained in:
Brian Goff 2017-10-03 11:06:04 -04:00 committed by GitHub
commit 1367fc1114
1 changed files with 2 additions and 0 deletions

View File

@ -224,6 +224,7 @@ func createSecrets(
} }
case apiclient.IsErrNotFound(err): case apiclient.IsErrNotFound(err):
// secret does not exist, then we create a new one. // 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 { if _, err := client.SecretCreate(ctx, secretSpec); err != nil {
return errors.Wrapf(err, "failed to create secret %s", secretSpec.Name) return errors.Wrapf(err, "failed to create secret %s", secretSpec.Name)
} }
@ -251,6 +252,7 @@ func createConfigs(
} }
case apiclient.IsErrNotFound(err): case apiclient.IsErrNotFound(err):
// config does not exist, then we create a new one. // 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 { if _, err := client.ConfigCreate(ctx, configSpec); err != nil {
errors.Wrapf(err, "failed to create config %s", configSpec.Name) errors.Wrapf(err, "failed to create config %s", configSpec.Name)
} }