feat: support chaos commits on deploy

See coop-cloud/organising#517
This commit is contained in:
2024-07-09 11:31:52 +02:00
parent 0ff8e49cfd
commit 2fb5493ab5
10 changed files with 115 additions and 35 deletions

View File

@ -36,8 +36,16 @@ var appUpgradeCommand = cli.Command{
Description: `
Upgrade an app.
This action could be destructive, please ensure you have a copy of your app
data beforehand.`,
Unlike "deploy", chaos operations are not supported here. Only recipe versions
are supported values for "[<version>]".
An upgrade can be destructive, please ensure you have a copy of your app data
beforehand.
EXAMPLE:
abra app upgrade foo.example.com
abra app upgrade foo.example.com 1.2.3+3.2.1`,
BashComplete: autocomplete.AppNameComplete,
Action: func(c *cli.Context) error {
app := internal.ValidateApp(c)
@ -192,7 +200,7 @@ data beforehand.`,
}
log.Debugf("choosing %s as version to upgrade", chosenUpgrade)
if err := app.Recipe.EnsureVersion(chosenUpgrade); err != nil {
if _, err := app.Recipe.EnsureVersion(chosenUpgrade); err != nil {
log.Fatal(err)
}