fix!: chaos consistency (deploy/undeploy/rollback/upgrade)

See coop-cloud/organising#559

--chaos for rollback/upgrade goes away.
This commit is contained in:
2024-07-08 12:54:37 +02:00
parent 4580df72cb
commit c33ca1c6bc
17 changed files with 241 additions and 246 deletions

View File

@ -13,8 +13,8 @@ import (
)
// NewVersionOverview shows an upgrade or downgrade overview
func NewVersionOverview(app appPkg.App, currentVersion, newVersion, releaseNotes string) error {
tableCol := []string{"server", "recipe", "config", "domain", "current version", "to be deployed"}
func NewVersionOverview(app appPkg.App, currentVersion, chaosVersion, newVersion, releaseNotes string) error {
tableCol := []string{"server", "recipe", "config", "domain", "version", "chaos", "to deploy"}
table := formatter.CreateTable(tableCol)
deployConfig := "compose.yml"
@ -27,7 +27,15 @@ func NewVersionOverview(app appPkg.App, currentVersion, newVersion, releaseNotes
server = "local"
}
table.Append([]string{server, app.Recipe.Name, deployConfig, app.Domain, currentVersion, newVersion})
table.Append([]string{
server,
app.Recipe.Name,
deployConfig,
app.Domain,
currentVersion,
chaosVersion,
newVersion,
})
table.Render()
if releaseNotes != "" && newVersion != "" {
@ -112,8 +120,8 @@ func PostCmds(cl *dockerClient.Client, app appPkg.App, commands string) error {
}
// DeployOverview shows a deployment overview
func DeployOverview(app appPkg.App, version, message string) error {
tableCol := []string{"server", "recipe", "config", "domain", "version"}
func DeployOverview(app appPkg.App, version, chaosVersion, message string) error {
tableCol := []string{"server", "recipe", "config", "domain", "version", "chaos"}
table := formatter.CreateTable(tableCol)
deployConfig := "compose.yml"
@ -126,7 +134,14 @@ func DeployOverview(app appPkg.App, version, message string) error {
server = "local"
}
table.Append([]string{server, app.Recipe.Name, deployConfig, app.Domain, version})
table.Append([]string{
server,
app.Recipe.Name,
deployConfig,
app.Domain,
version,
chaosVersion,
})
table.Render()
if NoInput {