fix: warn if secrets still exist
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
37ab9a9c08
commit
8215bb455b
@ -140,7 +140,12 @@ func GenerateSecrets(secretEnvVars map[string]string, appName, server string) (m
|
||||
return
|
||||
}
|
||||
if err := client.StoreSecret(secretRemoteName, passwords[0], server); err != nil {
|
||||
if strings.Contains(err.Error(), "AlreadyExists") {
|
||||
logrus.Warnf("%s already exists, moving on...", secretRemoteName)
|
||||
ch <- nil
|
||||
} else {
|
||||
ch <- err
|
||||
}
|
||||
return
|
||||
}
|
||||
secrets[secretName] = passwords[0]
|
||||
@ -151,8 +156,14 @@ func GenerateSecrets(secretEnvVars map[string]string, appName, server string) (m
|
||||
return
|
||||
}
|
||||
if err := client.StoreSecret(secretRemoteName, passphrases[0], server); err != nil {
|
||||
if strings.Contains(err.Error(), "AlreadyExists") {
|
||||
logrus.Warnf("%s already exists, moving on...", secretRemoteName)
|
||||
ch <- nil
|
||||
} else {
|
||||
ch <- err
|
||||
}
|
||||
return
|
||||
}
|
||||
secrets[secretName] = passphrases[0]
|
||||
}
|
||||
ch <- nil
|
||||
|
Loading…
Reference in New Issue
Block a user