From: Yolanda Robla Date: Thu, 5 Mar 2020 11:35:40 +0000 (+0100) Subject: Properly check status of the deployed cluster X-Git-Tag: akraino_r3~11 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=43198a1805009d31bf49abec5ff639be406a311a;p=kni%2Finstaller.git Properly check status of the deployed cluster The status was not captured properly, move the comparison after wait-for-install Signed-off-by: Yolanda Robla Change-Id: Ieaad4c81353359215d56f6bc23169c47aa5c89be --- diff --git a/ci/kni_deploy_libvirt.sh b/ci/kni_deploy_libvirt.sh index ad2a30a..09567ee 100755 --- a/ci/kni_deploy_libvirt.sh +++ b/ci/kni_deploy_libvirt.sh @@ -62,16 +62,17 @@ sudo -E /usr/bin/openshift-install create cluster --dir=/$HOME/.kni/${SITE_NAME} for i in 1 2 3; do sudo -E /usr/bin/openshift-install wait-for install-complete --dir=/$HOME/.kni/${SITE_NAME}/final_manifests && break done - -# output tfstate -echo "metadata.json for removing cluster" -sudo cat $HOME/.kni/${SITE_NAME}/final_manifests/metadata.json +STATUS=$? if [ $STATUS -ne 0 ]; then echo "Error deploying in libvirt" exit 1 fi +# output tfstate +echo "metadata.json for removing cluster" +sudo cat $HOME/.kni/${SITE_NAME}/final_manifests/metadata.json + echo "Cluster successfully deployed! Start applying workloads" ./knictl apply_workloads ${SITE_NAME} 2>&1 | tee ${WORKSPACE}/libvirt_workloads.log STATUS=$?