Add --cleanup-on-fail support into --atomic: use CleanupOnFail param in rollback

Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
pull/5579/head
Timofey Kirillov 7 years ago
parent 5027c29b56
commit f506db4b75

@ -283,17 +283,18 @@ func (u *upgradeCmd) run() error {
if u.atomic { if u.atomic {
fmt.Fprint(u.out, "ROLLING BACK") fmt.Fprint(u.out, "ROLLING BACK")
rollback := &rollbackCmd{ rollback := &rollbackCmd{
out: u.out, out: u.out,
client: u.client, client: u.client,
name: u.release, name: u.release,
dryRun: u.dryRun, dryRun: u.dryRun,
recreate: u.recreate, recreate: u.recreate,
force: u.force, force: u.force,
timeout: u.timeout, timeout: u.timeout,
wait: u.wait, wait: u.wait,
description: "", description: "",
revision: releaseHistory.Releases[0].Version, revision: releaseHistory.Releases[0].Version,
disableHooks: u.disableHooks, disableHooks: u.disableHooks,
cleanupOnFail: u.cleanupOnFail,
} }
if err := rollback.run(); err != nil { if err := rollback.run(); err != nil {
return err return err

Loading…
Cancel
Save