Properly check status of the deployed cluster 84/2284/1
authorYolanda Robla <yroblamo@redhat.com>
Thu, 5 Mar 2020 11:35:40 +0000 (12:35 +0100)
committerYolanda Robla <yroblamo@redhat.com>
Thu, 5 Mar 2020 11:35:40 +0000 (12:35 +0100)
The status was not captured properly, move
the comparison after wait-for-install

Signed-off-by: Yolanda Robla <yroblamo@redhat.com>
Change-Id: Ieaad4c81353359215d56f6bc23169c47aa5c89be

ci/kni_deploy_libvirt.sh

index ad2a30a..09567ee 100755 (executable)
@@ -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=$?