Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
Add cleanup_on_fail option (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorcreech authored Sep 16, 2020
1 parent 3b56d16 commit cb145d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions assets/out
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ test=$(jq -r '.params.test // "false"' < $payload)
purge=$(jq -r '.params.purge // "false"' < $payload)
devel=$(jq -r '.params.devel // "false"' < $payload)
atomic=$(jq -r '.params.atomic // "false"' < $payload)
cleanup_on_fail=$(jq -r '.params.cleanup_on_fail // "false"' < $payload)
recreate_pods=$(jq -r '.params.recreate_pods // "false"' < $payload)
force=$(jq -r '.params.force // "false"' < $payload)
show_diff=$(jq -r '.params.show_diff // "false"' < $payload)
Expand Down Expand Up @@ -137,6 +138,11 @@ helm_upgrade() {
else
upgrade_args=("upgrade" "$release" $chart_full "--tiller-namespace=$tiller_namespace")
non_diff_args+=("--install")

# --cleanup-on-fail is only present on the upgrade command (not install)
if [ "$cleanup_on_fail" = true ]; then
non_diff_args+=("--cleanup-on-fail")
fi
fi

if [ -n "$values" ]; then
Expand Down

0 comments on commit cb145d5

Please sign in to comment.