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:
@ -41,12 +41,12 @@ var appPsCommand = cli.Command{
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
isDeployed, deployedVersion, err := stack.IsDeployed(context.Background(), cl, app.StackName())
|
||||
deployMeta, err := stack.IsDeployed(context.Background(), cl, app.StackName())
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if !isDeployed {
|
||||
if !deployMeta.IsDeployed {
|
||||
log.Fatalf("%s is not deployed?", app.Name)
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ var appPsCommand = cli.Command{
|
||||
if statusMeta, ok := statuses[app.StackName()]; ok {
|
||||
isChaos, exists := statusMeta["chaos"]
|
||||
if exists && isChaos == "false" {
|
||||
if err := app.Recipe.EnsureVersion(deployedVersion); err != nil {
|
||||
if err := app.Recipe.EnsureVersion(deployMeta.Version); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
} else {
|
||||
@ -66,7 +66,7 @@ var appPsCommand = cli.Command{
|
||||
}
|
||||
}
|
||||
|
||||
showPSOutput(app, cl, deployedVersion, chaosVersion)
|
||||
showPSOutput(app, cl, deployMeta.Version, chaosVersion)
|
||||
|
||||
return nil
|
||||
},
|
||||
|
Reference in New Issue
Block a user