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,11 +36,16 @@ var appRollbackCommand = cli.Command{
Description: `
This command rolls an app back to a previous version.
You may pass "--force/-f" to downgrade to the same version again. This can be
useful if the container runtime has gotten into a weird state.
Unlike "deploy", chaos operations are not supported here. Only recipe versions
are supported values for "[<version>]".
This action could be destructive, please ensure you have a copy of your app
data beforehand.`,
A rollback can be destructive, please ensure you have a copy of your app data
beforehand.
EXAMPLE:
abra app rollback foo.example.com
abra app rollback foo.example.com 1.2.3+3.2.1`,
BashComplete: autocomplete.AppNameComplete,
Action: func(c *cli.Context) error {
app := internal.ValidateApp(c)
@ -169,7 +174,7 @@ data beforehand.`,
}
log.Debugf("choosing %s as version to rollback", chosenDowngrade)
if err := app.Recipe.EnsureVersion(chosenDowngrade); err != nil {
if _, err := app.Recipe.EnsureVersion(chosenDowngrade); err != nil {
log.Fatal(err)
}