diff --git a/cli/app/deploy.go b/cli/app/deploy.go index 3b412f12..17488a9c 100644 --- a/cli/app/deploy.go +++ b/cli/app/deploy.go @@ -3,6 +3,7 @@ package app import ( "context" "errors" + "fmt" "strings" "coopcloud.tech/abra/cli/internal" @@ -159,7 +160,18 @@ checkout as-is. Recipe commit hashes are also supported as values for appPkg.SetChaosVersionLabel(compose, stackName, toDeployVersion) } appPkg.SetUpdateLabel(compose, stackName, app.Env) - appPkg.SetVersionLabel(compose, stackName, toDeployVersion) + + versionLabel := toDeployVersion + if internal.Chaos { + for _, service := range compose.Services { + if service.Name == "app" { + labelKey := fmt.Sprintf("coop-cloud.%s.version", stackName) + // NOTE(d1): keep non-chaos version labbeling when doing chaos ops + versionLabel = service.Deploy.Labels[labelKey] + } + } + } + appPkg.SetVersionLabel(compose, stackName, versionLabel) envVars, err := appPkg.CheckEnv(app) if err != nil {