forked from toolshed/abra
fix!: chaos consistency (deploy/undeploy/rollback/upgrade)
See coop-cloud/organising#559 --chaos for rollback/upgrade goes away.
This commit is contained in:
@ -253,20 +253,20 @@ func getLatestUpgrade(cl *dockerclient.Client, stackName string, recipeName stri
|
||||
func getDeployedVersion(cl *dockerclient.Client, stackName string, recipeName string) (string, error) {
|
||||
log.Debugf("retrieve deployed version whether %s is already deployed", stackName)
|
||||
|
||||
isDeployed, deployedVersion, err := stack.IsDeployed(context.Background(), cl, stackName)
|
||||
deployMeta, err := stack.IsDeployed(context.Background(), cl, stackName)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
if !isDeployed {
|
||||
if !deployMeta.IsDeployed {
|
||||
return "", fmt.Errorf("%s is not deployed?", stackName)
|
||||
}
|
||||
|
||||
if deployedVersion == "unknown" {
|
||||
if deployMeta.Version == "unknown" {
|
||||
return "", fmt.Errorf("failed to determine deployed version of %s", stackName)
|
||||
}
|
||||
|
||||
return deployedVersion, nil
|
||||
return deployMeta.Version, nil
|
||||
}
|
||||
|
||||
// getAvailableUpgrades returns all available versions of an app that are newer
|
||||
|
Reference in New Issue
Block a user