refactor!: --ignore-env-version is --latest *only* on deploy
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
See #617
This commit is contained in:
@ -262,6 +262,14 @@ func validateArgsAndFlags(args []string) error {
|
|||||||
return errors.New(i18n.G("cannot use [version] and --chaos together"))
|
return errors.New(i18n.G("cannot use [version] and --chaos together"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(args) == 2 && args[1] != "" && internal.DeployLatest {
|
||||||
|
return errors.New(i18n.G("cannot use [version] and --latest together"))
|
||||||
|
}
|
||||||
|
|
||||||
|
if internal.DeployLatest && internal.Chaos {
|
||||||
|
return errors.New(i18n.G("cannot use --chaos and --latest together"))
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -298,7 +306,7 @@ func getDeployVersion(cliArgs []string, deployMeta stack.DeployMeta, app app.App
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if the recipe has a version in the .env file
|
// Check if the recipe has a version in the .env file
|
||||||
if app.Recipe.EnvVersion != "" && !internal.IgnoreEnvVersion {
|
if app.Recipe.EnvVersion != "" && !internal.DeployLatest {
|
||||||
if strings.HasSuffix(app.Recipe.EnvVersionRaw, "+U") {
|
if strings.HasSuffix(app.Recipe.EnvVersionRaw, "+U") {
|
||||||
return "", errors.New(i18n.G("version: can not redeploy chaos version %s", app.Recipe.EnvVersionRaw))
|
return "", errors.New(i18n.G("version: can not redeploy chaos version %s", app.Recipe.EnvVersionRaw))
|
||||||
}
|
}
|
||||||
@ -307,7 +315,7 @@ func getDeployVersion(cliArgs []string, deployMeta stack.DeployMeta, app app.App
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Take deployed version
|
// Take deployed version
|
||||||
if deployMeta.IsDeployed {
|
if deployMeta.IsDeployed && !internal.DeployLatest {
|
||||||
log.Debug(i18n.G("version: taking deployed version: %s", deployMeta.Version))
|
log.Debug(i18n.G("version: taking deployed version: %s", deployMeta.Version))
|
||||||
return deployMeta.Version, nil
|
return deployMeta.Version, nil
|
||||||
}
|
}
|
||||||
@ -352,4 +360,12 @@ func init() {
|
|||||||
false,
|
false,
|
||||||
i18n.G("disable converge logic checks"),
|
i18n.G("disable converge logic checks"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
AppDeployCommand.PersistentFlags().BoolVarP(
|
||||||
|
&internal.DeployLatest,
|
||||||
|
"latest",
|
||||||
|
"l",
|
||||||
|
false,
|
||||||
|
i18n.G("deploy latest recipe version"),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ var (
|
|||||||
Debug bool
|
Debug bool
|
||||||
NoInput bool
|
NoInput bool
|
||||||
Offline bool
|
Offline bool
|
||||||
IgnoreEnvVersion bool
|
|
||||||
|
|
||||||
// NOTE(d1): sub-command specific
|
// NOTE(d1): sub-command specific
|
||||||
Chaos bool
|
Chaos bool
|
||||||
|
DeployLatest bool
|
||||||
DontWaitConverge bool
|
DontWaitConverge bool
|
||||||
Dry bool
|
Dry bool
|
||||||
Force bool
|
Force bool
|
||||||
|
@ -6,6 +6,6 @@ func GetEnsureContext() recipe.EnsureContext {
|
|||||||
return recipe.EnsureContext{
|
return recipe.EnsureContext{
|
||||||
Chaos,
|
Chaos,
|
||||||
Offline,
|
Offline,
|
||||||
IgnoreEnvVersion,
|
DeployLatest,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,14 +137,6 @@ func Run(version, commit string) {
|
|||||||
i18n.G("prefer offline & filesystem access"),
|
i18n.G("prefer offline & filesystem access"),
|
||||||
)
|
)
|
||||||
|
|
||||||
rootCmd.PersistentFlags().BoolVarP(
|
|
||||||
&internal.IgnoreEnvVersion,
|
|
||||||
"ignore-env-version",
|
|
||||||
"i",
|
|
||||||
false,
|
|
||||||
i18n.G("ignore .env version checkout"),
|
|
||||||
)
|
|
||||||
|
|
||||||
catalogue.CatalogueCommand.AddCommand(
|
catalogue.CatalogueCommand.AddCommand(
|
||||||
catalogue.CatalogueGenerateCommand,
|
catalogue.CatalogueGenerateCommand,
|
||||||
catalogue.CatalogueSyncCommand,
|
catalogue.CatalogueSyncCommand,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr "Project-Id-Version: \n"
|
msgstr "Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||||
"POT-Creation-Date: 2025-08-29 09:54+0200\n"
|
"POT-Creation-Date: 2025-08-29 16:31+0200\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -552,7 +552,7 @@ msgstr ""
|
|||||||
msgid "Both local recipe and live deployment labels are shown."
|
msgid "Both local recipe and live deployment labels are shown."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/backup.go:298 ./cli/app/backup.go:314 ./cli/app/check.go:90 ./cli/app/cmd.go:277 ./cli/app/cp.go:381 ./cli/app/deploy.go:327 ./cli/app/labels.go:138 ./cli/app/new.go:368 ./cli/app/ps.go:209 ./cli/app/restart.go:157 ./cli/app/restore.go:134 ./cli/app/secret.go:553 ./cli/app/secret.go:593 ./cli/app/secret.go:617 ./cli/app/secret.go:625 ./cli/catalogue/catalogue.go:309 ./cli/recipe/lint.go:131 ./cli/updater/updater.go:544
|
#: ./cli/app/backup.go:298 ./cli/app/backup.go:314 ./cli/app/check.go:90 ./cli/app/cmd.go:277 ./cli/app/cp.go:381 ./cli/app/deploy.go:335 ./cli/app/labels.go:138 ./cli/app/new.go:368 ./cli/app/ps.go:209 ./cli/app/restart.go:157 ./cli/app/restore.go:134 ./cli/app/secret.go:553 ./cli/app/secret.go:593 ./cli/app/secret.go:617 ./cli/app/secret.go:625 ./cli/catalogue/catalogue.go:309 ./cli/recipe/lint.go:131 ./cli/updater/updater.go:544
|
||||||
msgid "C"
|
msgid "C"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -693,7 +693,7 @@ msgid "Creates a new app from a default recipe.\n"
|
|||||||
"on your $PATH."
|
"on your $PATH."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/deploy.go:343 ./cli/app/new.go:344 ./cli/app/rollback.go:332 ./cli/app/upgrade.go:443
|
#: ./cli/app/deploy.go:351 ./cli/app/new.go:344 ./cli/app/rollback.go:332 ./cli/app/upgrade.go:443
|
||||||
msgid "D"
|
msgid "D"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -1720,7 +1720,7 @@ msgstr ""
|
|||||||
msgid "broken symlink in your abra config folders: %s"
|
msgid "broken symlink in your abra config folders: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/backup.go:140 ./cli/app/cp.go:31 ./cli/app/deploy.go:351 ./cli/app/rollback.go:340 ./cli/app/upgrade.go:451
|
#: ./cli/app/backup.go:140 ./cli/app/cp.go:31 ./cli/app/deploy.go:359 ./cli/app/rollback.go:340 ./cli/app/upgrade.go:451
|
||||||
msgid "c"
|
msgid "c"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -1785,6 +1785,10 @@ msgstr ""
|
|||||||
msgid "cannot use '[secret] [version]' and '--all' together"
|
msgid "cannot use '[secret] [version]' and '--all' together"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ./cli/app/deploy.go:270
|
||||||
|
msgid "cannot use --chaos and --latest together"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/cmd.go:103
|
#: ./cli/app/cmd.go:103
|
||||||
msgid "cannot use --local & --user together"
|
msgid "cannot use --local & --user together"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -1809,6 +1813,10 @@ msgstr ""
|
|||||||
msgid "cannot use [version] and --chaos together"
|
msgid "cannot use [version] and --chaos together"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ./cli/app/deploy.go:266
|
||||||
|
msgid "cannot use [version] and --latest together"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/run.go:32
|
#: ./cli/run.go:32
|
||||||
msgid "catalogue"
|
msgid "catalogue"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -1834,7 +1842,7 @@ msgstr ""
|
|||||||
msgid "cfg"
|
msgid "cfg"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/backup.go:297 ./cli/app/backup.go:313 ./cli/app/check.go:89 ./cli/app/cmd.go:276 ./cli/app/cp.go:380 ./cli/app/deploy.go:326 ./cli/app/labels.go:137 ./cli/app/new.go:367 ./cli/app/ps.go:208 ./cli/app/restart.go:156 ./cli/app/restore.go:133 ./cli/app/secret.go:552 ./cli/app/secret.go:592 ./cli/app/secret.go:616 ./cli/app/secret.go:624 ./cli/catalogue/catalogue.go:308 ./cli/recipe/lint.go:130 ./cli/updater/updater.go:543
|
#: ./cli/app/backup.go:297 ./cli/app/backup.go:313 ./cli/app/check.go:89 ./cli/app/cmd.go:276 ./cli/app/cp.go:380 ./cli/app/deploy.go:334 ./cli/app/labels.go:137 ./cli/app/new.go:367 ./cli/app/ps.go:208 ./cli/app/restart.go:156 ./cli/app/restore.go:133 ./cli/app/secret.go:552 ./cli/app/secret.go:592 ./cli/app/secret.go:616 ./cli/app/secret.go:624 ./cli/catalogue/catalogue.go:308 ./cli/recipe/lint.go:130 ./cli/updater/updater.go:543
|
||||||
msgid "chaos"
|
msgid "chaos"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2155,6 +2163,10 @@ msgstr ""
|
|||||||
msgid "deploy labels stanza present"
|
msgid "deploy labels stanza present"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ./cli/app/deploy.go:369
|
||||||
|
msgid "deploy latest recipe version"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ./pkg/upstream/stack/stack.go:637
|
#: ./pkg/upstream/stack/stack.go:637
|
||||||
msgid "deploy succeeded 🟢"
|
msgid "deploy succeeded 🟢"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -2228,11 +2240,11 @@ msgstr ""
|
|||||||
msgid "dirty: %v, "
|
msgid "dirty: %v, "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/deploy.go:353 ./cli/app/rollback.go:342 ./cli/app/upgrade.go:453
|
#: ./cli/app/deploy.go:361 ./cli/app/rollback.go:342 ./cli/app/upgrade.go:453
|
||||||
msgid "disable converge logic checks"
|
msgid "disable converge logic checks"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/deploy.go:345 ./cli/app/rollback.go:334 ./cli/app/upgrade.go:445
|
#: ./cli/app/deploy.go:353 ./cli/app/rollback.go:334 ./cli/app/upgrade.go:445
|
||||||
msgid "disable public DNS checks"
|
msgid "disable public DNS checks"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2452,7 +2464,7 @@ msgstr ""
|
|||||||
msgid "expected 1 service but found %v: %s"
|
msgid "expected 1 service but found %v: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/deploy.go:335 ./cli/app/remove.go:158 ./cli/app/rollback.go:324 ./cli/app/secret.go:577 ./cli/app/upgrade.go:435 ./cli/app/volume.go:204 ./cli/recipe/fetch.go:20 ./cli/recipe/fetch.go:133
|
#: ./cli/app/deploy.go:343 ./cli/app/remove.go:158 ./cli/app/rollback.go:324 ./cli/app/secret.go:577 ./cli/app/upgrade.go:435 ./cli/app/volume.go:204 ./cli/recipe/fetch.go:20 ./cli/recipe/fetch.go:133
|
||||||
msgid "f"
|
msgid "f"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2648,7 +2660,7 @@ msgstr ""
|
|||||||
msgid "for %s read env %s with value: %s from docker service"
|
msgid "for %s read env %s with value: %s from docker service"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/deploy.go:334 ./cli/app/remove.go:157 ./cli/app/rollback.go:323 ./cli/app/upgrade.go:434 ./cli/app/volume.go:203 ./cli/recipe/fetch.go:132
|
#: ./cli/app/deploy.go:342 ./cli/app/remove.go:157 ./cli/app/rollback.go:323 ./cli/app/upgrade.go:434 ./cli/app/volume.go:203 ./cli/recipe/fetch.go:132
|
||||||
msgid "force"
|
msgid "force"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2845,11 +2857,7 @@ msgstr ""
|
|||||||
msgid "id: %s, "
|
msgid "id: %s, "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/run.go:145
|
#: ./cli/app/backup.go:300 ./cli/app/backup.go:316 ./cli/app/check.go:92 ./cli/app/cmd.go:279 ./cli/app/cp.go:383 ./cli/app/deploy.go:337 ./cli/app/labels.go:140 ./cli/app/new.go:370 ./cli/app/ps.go:211 ./cli/app/restart.go:159 ./cli/app/restore.go:136 ./cli/app/secret.go:555 ./cli/app/secret.go:595 ./cli/app/secret.go:619 ./cli/app/secret.go:627 ./cli/catalogue/catalogue.go:311 ./cli/recipe/lint.go:133 ./cli/updater/updater.go:546
|
||||||
msgid "ignore .env version checkout"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ./cli/app/backup.go:300 ./cli/app/backup.go:316 ./cli/app/check.go:92 ./cli/app/cmd.go:279 ./cli/app/cp.go:383 ./cli/app/deploy.go:329 ./cli/app/labels.go:140 ./cli/app/new.go:370 ./cli/app/ps.go:211 ./cli/app/restart.go:159 ./cli/app/restore.go:136 ./cli/app/secret.go:555 ./cli/app/secret.go:595 ./cli/app/secret.go:619 ./cli/app/secret.go:627 ./cli/catalogue/catalogue.go:311 ./cli/recipe/lint.go:133 ./cli/updater/updater.go:546
|
|
||||||
msgid "ignore uncommitted recipes changes"
|
msgid "ignore uncommitted recipes changes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -3454,11 +3462,11 @@ msgstr ""
|
|||||||
msgid "no volumes to remove"
|
msgid "no volumes to remove"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/deploy.go:350 ./cli/app/rollback.go:339 ./cli/app/upgrade.go:450
|
#: ./cli/app/deploy.go:358 ./cli/app/rollback.go:339 ./cli/app/upgrade.go:450
|
||||||
msgid "no-converge-checks"
|
msgid "no-converge-checks"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/deploy.go:342 ./cli/app/rollback.go:331 ./cli/app/upgrade.go:442
|
#: ./cli/app/deploy.go:350 ./cli/app/rollback.go:331 ./cli/app/upgrade.go:442
|
||||||
msgid "no-domain-checks"
|
msgid "no-domain-checks"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -3590,7 +3598,7 @@ msgstr ""
|
|||||||
msgid "pattern"
|
msgid "pattern"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/deploy.go:337 ./cli/app/remove.go:160 ./cli/app/rollback.go:326 ./cli/app/upgrade.go:437 ./cli/app/volume.go:206
|
#: ./cli/app/deploy.go:345 ./cli/app/remove.go:160 ./cli/app/rollback.go:326 ./cli/app/upgrade.go:437 ./cli/app/volume.go:206
|
||||||
msgid "perform action without further prompt"
|
msgid "perform action without further prompt"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -4130,7 +4138,7 @@ msgstr ""
|
|||||||
msgid "secret not found: %s"
|
msgid "secret not found: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/deploy.go:276
|
#: ./cli/app/deploy.go:284
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "secret not generated: %s"
|
msgid "secret not generated: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -5004,32 +5012,32 @@ msgstr ""
|
|||||||
msgid "version wiped from %s.env"
|
msgid "version wiped from %s.env"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/deploy.go:303
|
#: ./cli/app/deploy.go:311
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "version: can not redeploy chaos version %s"
|
msgid "version: can not redeploy chaos version %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/deploy.go:290
|
#: ./cli/app/deploy.go:298
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "version: taking chaos version: %s"
|
msgid "version: taking chaos version: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/deploy.go:311
|
#: ./cli/app/deploy.go:319
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "version: taking deployed version: %s"
|
msgid "version: taking deployed version: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/deploy.go:316
|
#: ./cli/app/deploy.go:324
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "version: taking new recipe version: %s"
|
msgid "version: taking new recipe version: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/deploy.go:305
|
#: ./cli/app/deploy.go:313
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "version: taking version from .env file: %s"
|
msgid "version: taking version from .env file: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ./cli/app/deploy.go:296
|
#: ./cli/app/deploy.go:304
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "version: taking version from cli arg: %s"
|
msgid "version: taking version from cli arg: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2,7 +2,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||||
"POT-Creation-Date: 2025-08-29 09:54+0200\n"
|
"POT-Creation-Date: 2025-08-29 16:31+0200\n"
|
||||||
"PO-Revision-Date: 2025-08-29 08:00+0000\n"
|
"PO-Revision-Date: 2025-08-29 08:00+0000\n"
|
||||||
"Last-Translator: chasqui <chasqui@cryptolab.net>\n"
|
"Last-Translator: chasqui <chasqui@cryptolab.net>\n"
|
||||||
"Language-Team: Spanish <https://translate.coopcloud.tech/projects/co-op-"
|
"Language-Team: Spanish <https://translate.coopcloud.tech/projects/co-op-"
|
||||||
@ -577,7 +577,7 @@ msgid "Both local recipe and live deployment labels are shown."
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/backup.go:298 cli/app/backup.go:314 cli/app/check.go:90
|
#: cli/app/backup.go:298 cli/app/backup.go:314 cli/app/check.go:90
|
||||||
#: cli/app/cmd.go:277 cli/app/cp.go:381 cli/app/deploy.go:327
|
#: cli/app/cmd.go:277 cli/app/cp.go:381 cli/app/deploy.go:335
|
||||||
#: cli/app/labels.go:138 cli/app/new.go:368 cli/app/ps.go:209
|
#: cli/app/labels.go:138 cli/app/new.go:368 cli/app/ps.go:209
|
||||||
#: cli/app/restart.go:157 cli/app/restore.go:134 cli/app/secret.go:553
|
#: cli/app/restart.go:157 cli/app/restore.go:134 cli/app/secret.go:553
|
||||||
#: cli/app/secret.go:593 cli/app/secret.go:617 cli/app/secret.go:625
|
#: cli/app/secret.go:593 cli/app/secret.go:617 cli/app/secret.go:625
|
||||||
@ -743,7 +743,7 @@ msgid ""
|
|||||||
"on your $PATH."
|
"on your $PATH."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/deploy.go:343 cli/app/new.go:344 cli/app/rollback.go:332
|
#: cli/app/deploy.go:351 cli/app/new.go:344 cli/app/rollback.go:332
|
||||||
#: cli/app/upgrade.go:443
|
#: cli/app/upgrade.go:443
|
||||||
msgid "D"
|
msgid "D"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -1870,7 +1870,7 @@ msgstr ""
|
|||||||
msgid "broken symlink in your abra config folders: %s"
|
msgid "broken symlink in your abra config folders: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/backup.go:140 cli/app/cp.go:31 cli/app/deploy.go:351
|
#: cli/app/backup.go:140 cli/app/cp.go:31 cli/app/deploy.go:359
|
||||||
#: cli/app/rollback.go:340 cli/app/upgrade.go:451
|
#: cli/app/rollback.go:340 cli/app/upgrade.go:451
|
||||||
msgid "c"
|
msgid "c"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -1936,6 +1936,10 @@ msgstr ""
|
|||||||
msgid "cannot use '[secret] [version]' and '--all' together"
|
msgid "cannot use '[secret] [version]' and '--all' together"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: cli/app/deploy.go:270
|
||||||
|
msgid "cannot use --chaos and --latest together"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/cmd.go:103
|
#: cli/app/cmd.go:103
|
||||||
msgid "cannot use --local & --user together"
|
msgid "cannot use --local & --user together"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -1960,6 +1964,10 @@ msgstr ""
|
|||||||
msgid "cannot use [version] and --chaos together"
|
msgid "cannot use [version] and --chaos together"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: cli/app/deploy.go:266
|
||||||
|
msgid "cannot use [version] and --latest together"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: cli/run.go:32
|
#: cli/run.go:32
|
||||||
msgid "catalogue"
|
msgid "catalogue"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -1986,7 +1994,7 @@ msgid "cfg"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/backup.go:297 cli/app/backup.go:313 cli/app/check.go:89
|
#: cli/app/backup.go:297 cli/app/backup.go:313 cli/app/check.go:89
|
||||||
#: cli/app/cmd.go:276 cli/app/cp.go:380 cli/app/deploy.go:326
|
#: cli/app/cmd.go:276 cli/app/cp.go:380 cli/app/deploy.go:334
|
||||||
#: cli/app/labels.go:137 cli/app/new.go:367 cli/app/ps.go:208
|
#: cli/app/labels.go:137 cli/app/new.go:367 cli/app/ps.go:208
|
||||||
#: cli/app/restart.go:156 cli/app/restore.go:133 cli/app/secret.go:552
|
#: cli/app/restart.go:156 cli/app/restore.go:133 cli/app/secret.go:552
|
||||||
#: cli/app/secret.go:592 cli/app/secret.go:616 cli/app/secret.go:624
|
#: cli/app/secret.go:592 cli/app/secret.go:616 cli/app/secret.go:624
|
||||||
@ -2319,6 +2327,11 @@ msgstr ""
|
|||||||
msgid "deploy labels stanza present"
|
msgid "deploy labels stanza present"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: cli/app/deploy.go:369
|
||||||
|
#, fuzzy
|
||||||
|
msgid "deploy latest recipe version"
|
||||||
|
msgstr "Publicar una nueva versión de una receta"
|
||||||
|
|
||||||
#: pkg/upstream/stack/stack.go:637
|
#: pkg/upstream/stack/stack.go:637
|
||||||
msgid "deploy succeeded 🟢"
|
msgid "deploy succeeded 🟢"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -2392,11 +2405,11 @@ msgstr ""
|
|||||||
msgid "dirty: %v, "
|
msgid "dirty: %v, "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/deploy.go:353 cli/app/rollback.go:342 cli/app/upgrade.go:453
|
#: cli/app/deploy.go:361 cli/app/rollback.go:342 cli/app/upgrade.go:453
|
||||||
msgid "disable converge logic checks"
|
msgid "disable converge logic checks"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/deploy.go:345 cli/app/rollback.go:334 cli/app/upgrade.go:445
|
#: cli/app/deploy.go:353 cli/app/rollback.go:334 cli/app/upgrade.go:445
|
||||||
msgid "disable public DNS checks"
|
msgid "disable public DNS checks"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -2623,7 +2636,7 @@ msgstr ""
|
|||||||
msgid "expected 1 service but found %v: %s"
|
msgid "expected 1 service but found %v: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/deploy.go:335 cli/app/remove.go:158 cli/app/rollback.go:324
|
#: cli/app/deploy.go:343 cli/app/remove.go:158 cli/app/rollback.go:324
|
||||||
#: cli/app/secret.go:577 cli/app/upgrade.go:435 cli/app/volume.go:204
|
#: cli/app/secret.go:577 cli/app/upgrade.go:435 cli/app/volume.go:204
|
||||||
#: cli/recipe/fetch.go:20 cli/recipe/fetch.go:133
|
#: cli/recipe/fetch.go:20 cli/recipe/fetch.go:133
|
||||||
msgid "f"
|
msgid "f"
|
||||||
@ -2821,7 +2834,7 @@ msgstr ""
|
|||||||
msgid "for %s read env %s with value: %s from docker service"
|
msgid "for %s read env %s with value: %s from docker service"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/deploy.go:334 cli/app/remove.go:157 cli/app/rollback.go:323
|
#: cli/app/deploy.go:342 cli/app/remove.go:157 cli/app/rollback.go:323
|
||||||
#: cli/app/upgrade.go:434 cli/app/volume.go:203 cli/recipe/fetch.go:132
|
#: cli/app/upgrade.go:434 cli/app/volume.go:203 cli/recipe/fetch.go:132
|
||||||
msgid "force"
|
msgid "force"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -3020,12 +3033,8 @@ msgstr ""
|
|||||||
msgid "id: %s, "
|
msgid "id: %s, "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/run.go:145
|
|
||||||
msgid "ignore .env version checkout"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: cli/app/backup.go:300 cli/app/backup.go:316 cli/app/check.go:92
|
#: cli/app/backup.go:300 cli/app/backup.go:316 cli/app/check.go:92
|
||||||
#: cli/app/cmd.go:279 cli/app/cp.go:383 cli/app/deploy.go:329
|
#: cli/app/cmd.go:279 cli/app/cp.go:383 cli/app/deploy.go:337
|
||||||
#: cli/app/labels.go:140 cli/app/new.go:370 cli/app/ps.go:211
|
#: cli/app/labels.go:140 cli/app/new.go:370 cli/app/ps.go:211
|
||||||
#: cli/app/restart.go:159 cli/app/restore.go:136 cli/app/secret.go:555
|
#: cli/app/restart.go:159 cli/app/restore.go:136 cli/app/secret.go:555
|
||||||
#: cli/app/secret.go:595 cli/app/secret.go:619 cli/app/secret.go:627
|
#: cli/app/secret.go:595 cli/app/secret.go:619 cli/app/secret.go:627
|
||||||
@ -3658,11 +3667,11 @@ msgstr ""
|
|||||||
msgid "no volumes to remove"
|
msgid "no volumes to remove"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/deploy.go:350 cli/app/rollback.go:339 cli/app/upgrade.go:450
|
#: cli/app/deploy.go:358 cli/app/rollback.go:339 cli/app/upgrade.go:450
|
||||||
msgid "no-converge-checks"
|
msgid "no-converge-checks"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/deploy.go:342 cli/app/rollback.go:331 cli/app/upgrade.go:442
|
#: cli/app/deploy.go:350 cli/app/rollback.go:331 cli/app/upgrade.go:442
|
||||||
msgid "no-domain-checks"
|
msgid "no-domain-checks"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -3802,7 +3811,7 @@ msgstr ""
|
|||||||
msgid "pattern"
|
msgid "pattern"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/deploy.go:337 cli/app/remove.go:160 cli/app/rollback.go:326
|
#: cli/app/deploy.go:345 cli/app/remove.go:160 cli/app/rollback.go:326
|
||||||
#: cli/app/upgrade.go:437 cli/app/volume.go:206
|
#: cli/app/upgrade.go:437 cli/app/volume.go:206
|
||||||
msgid "perform action without further prompt"
|
msgid "perform action without further prompt"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -4354,7 +4363,7 @@ msgstr ""
|
|||||||
msgid "secret not found: %s"
|
msgid "secret not found: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/deploy.go:276
|
#: cli/app/deploy.go:284
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "secret not generated: %s"
|
msgid "secret not generated: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -5244,32 +5253,32 @@ msgstr ""
|
|||||||
msgid "version wiped from %s.env"
|
msgid "version wiped from %s.env"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/deploy.go:303
|
#: cli/app/deploy.go:311
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "version: can not redeploy chaos version %s"
|
msgid "version: can not redeploy chaos version %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/deploy.go:290
|
#: cli/app/deploy.go:298
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "version: taking chaos version: %s"
|
msgid "version: taking chaos version: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/deploy.go:311
|
#: cli/app/deploy.go:319
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "version: taking deployed version: %s"
|
msgid "version: taking deployed version: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/deploy.go:316
|
#: cli/app/deploy.go:324
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "version: taking new recipe version: %s"
|
msgid "version: taking new recipe version: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/deploy.go:305
|
#: cli/app/deploy.go:313
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "version: taking version from .env file: %s"
|
msgid "version: taking version from .env file: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: cli/app/deploy.go:296
|
#: cli/app/deploy.go:304
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "version: taking version from cli arg: %s"
|
msgid "version: taking version from cli arg: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -393,6 +393,64 @@ teardown(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
# bats test_tags=slow
|
# bats test_tags=slow
|
||||||
|
@test "deploy latest from undeployed specific version" {
|
||||||
|
latestRelease=$(_latest_release)
|
||||||
|
|
||||||
|
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.0+1.20.0" \
|
||||||
|
--no-input --no-converge-checks
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
_undeploy_app
|
||||||
|
|
||||||
|
run grep -q "TYPE=$TEST_RECIPE:0.1.0+1.20.0" \
|
||||||
|
"$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
run $ABRA app deploy "$TEST_APP_DOMAIN" \
|
||||||
|
--no-input --no-converge-checks --latest
|
||||||
|
assert_success
|
||||||
|
assert_output --partial "$latestRelease"
|
||||||
|
|
||||||
|
run grep -q "TYPE=$TEST_RECIPE:$latestRelease" \
|
||||||
|
"$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
|
||||||
|
assert_success
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "--latest is exclusive" {
|
||||||
|
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.0+1.20.0" --latest
|
||||||
|
assert_failure
|
||||||
|
assert_output --regexp "cannot use .* together"
|
||||||
|
|
||||||
|
run $ABRA app deploy "$TEST_APP_DOMAIN" --chaos --latest
|
||||||
|
assert_failure
|
||||||
|
assert_output --regexp "cannot use .* together"
|
||||||
|
}
|
||||||
|
|
||||||
|
# bats test_tags=slow
|
||||||
|
@test "deploy latest after chaos deploy" {
|
||||||
|
latestRelease=$(_latest_release)
|
||||||
|
|
||||||
|
run bash -c "echo foo >> $ABRA_DIR/recipes/$TEST_RECIPE/foo"
|
||||||
|
assert_success
|
||||||
|
assert_exists "$ABRA_DIR/recipes/$TEST_RECIPE/foo"
|
||||||
|
|
||||||
|
run $ABRA app deploy "$TEST_APP_DOMAIN" \
|
||||||
|
--no-input --no-converge-checks --chaos
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
_reset_recipe
|
||||||
|
assert_not_exists "$ABRA_DIR/recipes/$TEST_RECIPE/foo"
|
||||||
|
|
||||||
|
run $ABRA app deploy "$TEST_APP_DOMAIN" \
|
||||||
|
--no-input --no-converge-checks --force --latest
|
||||||
|
assert_success
|
||||||
|
assert_output --partial "$latestRelease"
|
||||||
|
|
||||||
|
run grep -q "TYPE=$TEST_RECIPE:$latestRelease" \
|
||||||
|
"$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
|
||||||
|
assert_success
|
||||||
|
}
|
||||||
|
|
||||||
@test "chaos version label includes dirty marker" {
|
@test "chaos version label includes dirty marker" {
|
||||||
run bash -c "echo foo >> $ABRA_DIR/recipes/$TEST_RECIPE/foo"
|
run bash -c "echo foo >> $ABRA_DIR/recipes/$TEST_RECIPE/foo"
|
||||||
assert_success
|
assert_success
|
||||||
@ -408,28 +466,7 @@ teardown(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
# bats test_tags=slow
|
# bats test_tags=slow
|
||||||
@test "ignore env version checkout after deploy" {
|
@test "deploy latest on new deploy" {
|
||||||
tagHash=$(_get_tag_hash "0.1.0+1.20.0")
|
|
||||||
|
|
||||||
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.0+1.20.0" \
|
|
||||||
--no-input --no-converge-checks
|
|
||||||
assert_success
|
|
||||||
|
|
||||||
assert_equal $(_get_current_hash) "$tagHash"
|
|
||||||
|
|
||||||
run $ABRA app check --ignore-env-version "$TEST_APP_DOMAIN"
|
|
||||||
assert_success
|
|
||||||
|
|
||||||
assert_equal $(_get_current_hash) "$(_get_head_hash)"
|
|
||||||
|
|
||||||
run $ABRA app check "$TEST_APP_DOMAIN"
|
|
||||||
assert_success
|
|
||||||
|
|
||||||
assert_equal $(_get_current_hash) "$tagHash"
|
|
||||||
}
|
|
||||||
|
|
||||||
# bats test_tags=slow
|
|
||||||
@test "ignore env version on new deploy" {
|
|
||||||
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.0+1.20.0" \
|
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.0+1.20.0" \
|
||||||
--no-input --no-converge-checks
|
--no-input --no-converge-checks
|
||||||
assert_success
|
assert_success
|
||||||
@ -439,7 +476,7 @@ teardown(){
|
|||||||
latestRelease=$(_latest_release)
|
latestRelease=$(_latest_release)
|
||||||
|
|
||||||
run $ABRA app deploy "$TEST_APP_DOMAIN" \
|
run $ABRA app deploy "$TEST_APP_DOMAIN" \
|
||||||
--no-input --no-converge-checks --ignore-env-version
|
--no-input --no-converge-checks --latest
|
||||||
assert_success
|
assert_success
|
||||||
assert_output --partial "$latestRelease"
|
assert_output --partial "$latestRelease"
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,8 @@ teardown(){
|
|||||||
|
|
||||||
# bats test_tags=slow
|
# bats test_tags=slow
|
||||||
@test "takes deployed version when no .env version is present " {
|
@test "takes deployed version when no .env version is present " {
|
||||||
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.0+1.20.0" --no-input --no-converge-checks --ignore-env-version
|
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.0+1.20.0" \
|
||||||
|
--no-input --no-converge-checks
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
run grep -q "TYPE=$TEST_RECIPE:0.1.0+1.20.0" \
|
run grep -q "TYPE=$TEST_RECIPE:0.1.0+1.20.0" \
|
||||||
|
@ -86,7 +86,7 @@ teardown(){
|
|||||||
assert_success
|
assert_success
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "deploy, re-deploy, ignore env version" {
|
@test "deploy, re-deploy, deploy latest" {
|
||||||
latestRelease=$(_latest_release)
|
latestRelease=$(_latest_release)
|
||||||
|
|
||||||
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.1+1.20.2" \
|
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.1+1.20.2" \
|
||||||
@ -96,7 +96,7 @@ teardown(){
|
|||||||
_undeploy_app
|
_undeploy_app
|
||||||
|
|
||||||
run $ABRA app deploy "$TEST_APP_DOMAIN" \
|
run $ABRA app deploy "$TEST_APP_DOMAIN" \
|
||||||
--no-input --no-converge-checks --ignore-env-version
|
--no-input --no-converge-checks --latest
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
assert_output --partial 'NEW DEPLOY OVERVIEW'
|
assert_output --partial 'NEW DEPLOY OVERVIEW'
|
||||||
|
Reference in New Issue
Block a user