Change owner of the openrc file for compass 51/37051/5
authorLinda Wang <wangwulin@huawei.com>
Fri, 7 Jul 2017 06:06:16 +0000 (06:06 +0000)
committerLinda Wang <wangwulin@huawei.com>
Fri, 7 Jul 2017 07:52:24 +0000 (07:52 +0000)
The jenkins user is not permitted to view openrc file
with root owner and group.[1]
cat: /home/jenkins/opnfv-openrc.sh: Permission denied

[1]: https://build.opnfv.org/ci/view/functest/job/functest-compass-baremetal-daily-master/1293/console

Change-Id: I89d0597c8f0ece00f70fd6622048794b15510636
Signed-off-by: Linda Wang <wangwulin@huawei.com>
utils/fetch_os_creds.sh

index b514a91..285f838 100755 (executable)
@@ -155,6 +155,7 @@ elif [ "$installer_type" == "apex" ]; then
 elif [ "$installer_type" == "compass" ]; then
     if [ "${BRANCH}" == "master" ]; then
         sudo docker cp compass-tasks:/opt/openrc $dest_path &> /dev/null
+        sudo chown $(whoami):$(whoami) $dest_path
     else
         verify_connectivity $installer_ip
         controller_ip=$(sshpass -p'root' ssh 2>/dev/null $ssh_options root@${installer_ip} \