X-Git-Url: https://gerrit.nordix.org/gitweb?a=blobdiff_plain;f=jjb%2Fcloud-infra%2Fdelete-heat-stack.sh;h=b732de44601743e61042cc4e8f5f84606356845e;hb=9eb736478c2c3199f3cf22154883d59db016ded9;hp=2bd6c732a10675b8a1ba947b78b728d2279506fb;hpb=78358319a131e194c1b9b9777d5267b49b073308;p=infra%2Fcicd.git diff --git a/jjb/cloud-infra/delete-heat-stack.sh b/jjb/cloud-infra/delete-heat-stack.sh index 2bd6c732..b732de44 100644 --- a/jjb/cloud-infra/delete-heat-stack.sh +++ b/jjb/cloud-infra/delete-heat-stack.sh @@ -29,6 +29,7 @@ if [[ $DEPLOY_TYPE != "cloud" ]]; then exit 0 fi +# do not delete the stack if not explicitly set to delete if [[ "$DELETE_STACK" != "yes" ]]; then echo "-------------------------------------------------------------------------" echo "Info: Stack will not be deleted upon the completion of the job!" @@ -36,6 +37,14 @@ if [[ "$DELETE_STACK" != "yes" ]]; then exit 0 fi +# k8s and onap scenario have stacks so exit for others +if [[ ! "$DEPLOY_SCENARIO" =~ ^k8-.*|^onap-.* ]]; then + echo "-------------------------------------------------------------------------" + echo "Info: Nothing to delete!" + echo "-------------------------------------------------------------------------" + exit 0 +fi + echo echo echo "-------------------------------------------------------------------------"