We need to run it with sudo because previous commands
were also with sudo and there are permission problems if
not. But if we run with sudo installer tries to read
kubeconfig from /root/, not from /home/jenkins,
and it fails. So passing the build path pointing
to the right home.
Signed-off-by: Yolanda Robla <yroblamo@redhat.com>
Change-Id: I8aff76b7ece9e89258990c699b7fb36f8c70fb80
sudo cat $HOME/.kni/${SITE_NAME}/final_manifests/metadata.json
echo "Cluster successfully deployed! Start applying workloads"
-sudo -E ./knictl apply_workloads ${SITE_NAME} 2>&1 | tee ${WORKSPACE}/libvirt_workloads.log
+sudo -E ./knictl apply_workloads ${SITE_NAME} --build_path $HOME 2>&1 | tee ${WORKSPACE}/libvirt_workloads.log
STATUS=$?
if [ $STATUS -ne 0 ]; then