X-Git-Url: https://gerrit.nordix.org/gitweb?a=blobdiff_plain;f=jjb%2Fcloud-infra%2Fdelete-heat-stack.sh;h=b732de44601743e61042cc4e8f5f84606356845e;hb=9eb736478c2c3199f3cf22154883d59db016ded9;hp=b3239445c1461a2a9381344a81804cdb2e362fb4;hpb=55d5b81cb078f11e44827575c7e94cdb7a680db7;p=infra%2Fcicd.git diff --git a/jjb/cloud-infra/delete-heat-stack.sh b/jjb/cloud-infra/delete-heat-stack.sh index b3239445..b732de44 100644 --- a/jjb/cloud-infra/delete-heat-stack.sh +++ b/jjb/cloud-infra/delete-heat-stack.sh @@ -29,17 +29,18 @@ if [[ $DEPLOY_TYPE != "cloud" ]]; then exit 0 fi -# we don't support OpenStack scenario verification on OpenStack yet -if [[ "$DEPLOY_SCENARIO" =~ "os-" ]] && [[ "$PROVISIONER_TYPE" == "heat" ]]; then +# do not delete the stack if not explicitly set to delete +if [[ "$DELETE_STACK" != "yes" ]]; then echo "-------------------------------------------------------------------------" - echo "Info: OpenStack scenario verification on OpenStack has not been implemented yet!" + echo "Info: Stack will not be deleted upon the completion of the job!" echo "-------------------------------------------------------------------------" exit 0 fi -if [[ "$DELETE_STACK" != "yes" ]]; then +# k8s and onap scenario have stacks so exit for others +if [[ ! "$DEPLOY_SCENARIO" =~ ^k8-.*|^onap-.* ]]; then echo "-------------------------------------------------------------------------" - echo "Info: Stack will not be deleted upon the completion of the job!" + echo "Info: Nothing to delete!" echo "-------------------------------------------------------------------------" exit 0 fi