From: Ricardo Noriega Date: Fri, 17 Jul 2020 10:41:13 +0000 (+0200) Subject: Add destroy cluster per status check X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F28%2F3628%2F1;p=kni%2Finstaller.git Add destroy cluster per status check Change-Id: I6a170e6a5a3f8c8d29e9407a7a3a3e243864ad20 Signed-off-by: Ricardo Noriega --- diff --git a/ci/kni_deploy_aws.sh b/ci/kni_deploy_aws.sh index 0f7434a..198f839 100755 --- a/ci/kni_deploy_aws.sh +++ b/ci/kni_deploy_aws.sh @@ -56,6 +56,7 @@ cat $HOME/.kni/${SITE_NAME}/final_manifests/metadata.json if [ $STATUS -ne 0 ]; then echo "Error deploying in AWS" + $HOME/.kni/${SITE_NAME}/requirements/openshift-install destroy cluster --dir=/$HOME/.kni/${SITE_NAME}/final_manifests 2>&1 | tee ${WORKSPACE}/aws_destroy.log exit 1 fi @@ -65,6 +66,7 @@ STATUS=$? if [ $STATUS -ne 0 ]; then echo "Error applying workloads to AWS" + $HOME/.kni/${SITE_NAME}/requirements/openshift-install destroy cluster --dir=/$HOME/.kni/${SITE_NAME}/final_manifests 2>&1 | tee ${WORKSPACE}/aws_destroy.log exit 1 fi diff --git a/ci/kni_deploy_gcp.sh b/ci/kni_deploy_gcp.sh index 7c1f370..09a3348 100755 --- a/ci/kni_deploy_gcp.sh +++ b/ci/kni_deploy_gcp.sh @@ -56,6 +56,7 @@ cat $HOME/.kni/${SITE_NAME}/final_manifests/metadata.json if [ $STATUS -ne 0 ]; then echo "Error deploying in GCP" + $HOME/.kni/${SITE_NAME}/requirements/openshift-install destroy cluster --dir=/$HOME/.kni/${SITE_NAME}/final_manifests 2>&1 | tee ${WORKSPACE}/gcp_destroy.log exit 1 fi @@ -65,6 +66,7 @@ STATUS=$? if [ $STATUS -ne 0 ]; then echo "Error applying workloads to GCP" + $HOME/.kni/${SITE_NAME}/requirements/openshift-install destroy cluster --dir=/$HOME/.kni/${SITE_NAME}/final_manifests 2>&1 | tee ${WORKSPACE}/gcp_destroy.log exit 1 fi