From 43198a1805009d31bf49abec5ff639be406a311a Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Thu, 5 Mar 2020 12:35:40 +0100 Subject: [PATCH] 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 --- ci/kni_deploy_libvirt.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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=$? -- 2.16.6