forked from toolshed/abra
fix(app): Do not write recipe version on undeploy
This commit is contained in:
parent
d09a19a385
commit
ba0c0c793d
@ -59,16 +59,16 @@ Passing "--prune/-p" does not remove those volumes.`,
|
|||||||
chaosVersion = deployMeta.ChaosVersion
|
chaosVersion = deployMeta.ChaosVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
toWriteVersion := deployMeta.Version
|
version := deployMeta.Version
|
||||||
if deployMeta.IsChaos {
|
if deployMeta.IsChaos {
|
||||||
toWriteVersion = chaosVersion
|
version = chaosVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := internal.UndeployOverview(
|
if err := internal.UndeployOverview(
|
||||||
app,
|
app,
|
||||||
deployMeta.Version,
|
deployMeta.Version,
|
||||||
chaosVersion,
|
chaosVersion,
|
||||||
toWriteVersion,
|
version,
|
||||||
); err != nil {
|
); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
@ -86,10 +86,6 @@ Passing "--prune/-p" does not remove those volumes.`,
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := app.WriteRecipeVersion(toWriteVersion, false); err != nil {
|
|
||||||
log.Fatalf("writing recipe version failed: %s", err)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,10 +64,6 @@ teardown(){
|
|||||||
# env version
|
# env version
|
||||||
assert_output --regexp 'CURRENT VERSION.*' + "${latestRelease}"
|
assert_output --regexp 'CURRENT VERSION.*' + "${latestRelease}"
|
||||||
assert_output --regexp 'NEW VERSION.*' + "${headHash:0:8}"
|
assert_output --regexp 'NEW VERSION.*' + "${headHash:0:8}"
|
||||||
|
|
||||||
run grep -q "TYPE=$TEST_RECIPE:${headHash:0:8}" \
|
|
||||||
"$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
|
|
||||||
assert_success
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "chaos deploy with unstaged commits and undeploy" {
|
@test "chaos deploy with unstaged commits and undeploy" {
|
||||||
@ -93,10 +89,6 @@ teardown(){
|
|||||||
assert_output --regexp 'CURRENT VERSION.*' + "${latestRelease}"
|
assert_output --regexp 'CURRENT VERSION.*' + "${latestRelease}"
|
||||||
assert_output --regexp 'NEW VERSION.*' + "${headHash:0:8}+U"
|
assert_output --regexp 'NEW VERSION.*' + "${headHash:0:8}+U"
|
||||||
|
|
||||||
run grep -q "TYPE=$TEST_RECIPE:${headHash:0:8}" \
|
|
||||||
"$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
|
|
||||||
assert_success
|
|
||||||
|
|
||||||
run rm -rf "$ABRA_DIR/recipes/$TEST_RECIPE/foo"
|
run rm -rf "$ABRA_DIR/recipes/$TEST_RECIPE/foo"
|
||||||
assert_not_exists "$ABRA_DIR/recipes/$TEST_RECIPE/foo"
|
assert_not_exists "$ABRA_DIR/recipes/$TEST_RECIPE/foo"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user