Send build path to apply-workloads 90/2290/1
authorYolanda Robla <yroblamo@redhat.com>
Fri, 6 Mar 2020 16:05:44 +0000 (17:05 +0100)
committerYolanda Robla <yroblamo@redhat.com>
Fri, 6 Mar 2020 16:05:44 +0000 (17:05 +0100)
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

ci/kni_deploy_libvirt.sh

index ab2da52..2141a5b 100755 (executable)
@@ -75,7 +75,7 @@ echo "metadata.json for removing cluster"
 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