@ -107,15 +107,14 @@ checkout as-is. Recipe commit hashes are also supported as values for
|
|||||||
log.Fatal(i18n.G("get deploy version: %s", err))
|
log.Fatal(i18n.G("get deploy version: %s", err))
|
||||||
}
|
}
|
||||||
|
|
||||||
versionIsChaos := false
|
|
||||||
if !internal.Chaos {
|
if !internal.Chaos {
|
||||||
var err error
|
isChaosCommit, err := app.Recipe.EnsureVersion(toDeployVersion)
|
||||||
versionIsChaos, err = app.Recipe.EnsureVersion(toDeployVersion)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(i18n.G("ensure recipe: %s", err))
|
log.Fatal(i18n.G("ensure recipe: %s", err))
|
||||||
}
|
}
|
||||||
if versionIsChaos {
|
if isChaosCommit {
|
||||||
log.Warnf(i18n.G("version '%s' appears to be a chaos commit, but --chaos/-C was not provided", toDeployVersion))
|
log.Warnf(i18n.G("version '%s' appears to be a chaos commit, but --chaos/-C was not provided", toDeployVersion))
|
||||||
|
internal.Chaos = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,7 +154,7 @@ checkout as-is. Recipe commit hashes are also supported as values for
|
|||||||
|
|
||||||
appPkg.ExposeAllEnv(stackName, compose, app.Env)
|
appPkg.ExposeAllEnv(stackName, compose, app.Env)
|
||||||
appPkg.SetRecipeLabel(compose, stackName, app.Recipe.Name)
|
appPkg.SetRecipeLabel(compose, stackName, app.Recipe.Name)
|
||||||
appPkg.SetChaosLabel(compose, stackName, internal.Chaos || versionIsChaos)
|
appPkg.SetChaosLabel(compose, stackName, internal.Chaos)
|
||||||
if internal.Chaos {
|
if internal.Chaos {
|
||||||
appPkg.SetChaosVersionLabel(compose, stackName, toDeployVersion)
|
appPkg.SetChaosVersionLabel(compose, stackName, toDeployVersion)
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ teardown(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
# bats test_tags=slow
|
# bats test_tags=slow
|
||||||
@test "bail if env has a hash but no --chaos" {
|
@test "do not bail if env version is a hash but no --chaos" {
|
||||||
wantHash=$(_get_n_hash 3)
|
wantHash=$(_get_n_hash 3)
|
||||||
|
|
||||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" reset --hard HEAD~3
|
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" reset --hard HEAD~3
|
||||||
|
Reference in New Issue
Block a user