X-Git-Url: https://gerrit.nordix.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=jjb%2Fcloud-infra%2Fdelete-heat-stack.sh;fp=jjb%2Fcloud-infra%2Fdelete-heat-stack.sh;h=b732de44601743e61042cc4e8f5f84606356845e;hb=385413ec8a79ff2f7c92f01c2b67885bfc07890c;hp=872ba304d9d67f82da1cc5c38959aa73debe5453;hpb=3131a534939067f0a308bb8e1f915591cd8c99d5;p=infra%2Fcicd.git diff --git a/jjb/cloud-infra/delete-heat-stack.sh b/jjb/cloud-infra/delete-heat-stack.sh index 872ba304..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 only support k8s scenario deployment on openstack as of now -if [[ "$DEPLOY_SCENARIO" != "k8-*" ]] && [[ "$PROVISIONER_TYPE" == "heat" ]]; then +# do not delete the stack if not explicitly set to delete +if [[ "$DELETE_STACK" != "yes" ]]; then echo "-------------------------------------------------------------------------" - echo "Info: Only k8s scenario deployment on OpenStack has been implemented!" + 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