From 0cf945a3b38339ce7eaf5a7e901fc4095d66cd9e Mon Sep 17 00:00:00 2001 From: Ricardo Noriega Date: Fri, 17 Jul 2020 12:41:13 +0200 Subject: [PATCH] Add destroy cluster per status check Change-Id: I6a170e6a5a3f8c8d29e9407a7a3a3e243864ad20 Signed-off-by: Ricardo Noriega --- ci/kni_deploy_aws.sh | 2 ++ ci/kni_deploy_gcp.sh | 2 ++ 2 files changed, 4 insertions(+) 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 -- 2.16.6