refactor/fix: deploy/upgrade/rollback
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

See coop-cloud/abra#461
This commit is contained in:
2025-01-01 19:15:22 +01:00
parent 5975be6870
commit b0cd8ccbb9
85 changed files with 783 additions and 7118 deletions

View File

@ -68,11 +68,17 @@ func NewVersionOverview(
{"RECIPE", app.Recipe.Name},
{"SERVER", server},
{"CONFIG", deployConfig},
{"CURRENT DEPLOYMENT", "---"},
{"VERSION", deployedVersion},
{"CHAOS ", deployedChaosVersion},
{upperKind, "---"},
{"VERSION", toDeployVersion},
{fmt.Sprintf("%s.ENV", strings.ToUpper(app.Domain)), "---"},
{"OLD", app.Recipe.EnvVersion},
{"NEW", toDeployVersion},
}
overview := formatter.CreateOverview(
@ -119,7 +125,9 @@ func DeployOverview(
deployedVersion string,
deployedChaosVersion string,
toDeployVersion,
toDeployChaosVersion string) error {
toDeployChaosVersion string,
toWriteVersion string,
) error {
deployConfig := "compose.yml"
if composeFiles, ok := app.Env["COMPOSE_FILE"]; ok {
deployConfig = composeFiles
@ -154,6 +162,10 @@ func DeployOverview(
{"NEW DEPLOYMENT", "---"},
{"VERSION", toDeployVersion},
{"CHAOS", toDeployChaosVersion},
{fmt.Sprintf("%s.ENV", strings.ToUpper(app.Name)), "---"},
{"CURRENT VERSION", app.Recipe.EnvVersion},
{"NEW VERSION", toWriteVersion},
}
overview := formatter.CreateOverview("DEPLOY OVERVIEW", rows)
@ -210,9 +222,14 @@ func UndeployOverview(
{"RECIPE", app.Recipe.Name},
{"SERVER", server},
{"CONFIG", deployConfig},
{"CURRENT DEPLOYMENT", "---"},
{"DEPLOYED", version},
{"CHAOS", chaosVersion},
{fmt.Sprintf("%s.ENV", strings.ToUpper(app.Name)), "---"},
{"CURRENT VERSION", app.Recipe.EnvVersion},
{"NEW VERSION", version},
}
overview := formatter.CreateOverview("UNDEPLOY OVERVIEW", rows)