From 43158353fe6fd5b5e890c5f65e6c3a94f458c2e9 Mon Sep 17 00:00:00 2001 From: xudan Date: Sun, 25 Jun 2017 21:46:35 -0400 Subject: Bugfix: Dovetail CI failed with Permission denied JIRA: DOVETAIL-451 1. Dovetail CI jobs failed because of Permission denied. 2. The directory ${WORKSPACE}/cvp/pre_config is created with sudo privilege, so fetch_os_creds without sudo got Permission denied. 3. Remove the sudo when create directory ${WORKSPACE}/cvp/pre_config. Change-Id: I802dc1cf8479b61929a9311800e65d357f4a7d34 Signed-off-by: xudan --- jjb/dovetail/dovetail-run.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index 6bfb109ad..09bf6e1ae 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -7,14 +7,12 @@ set -e [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" DOVETAIL_HOME=${WORKSPACE}/cvp -if [ -d ${DOVETAIL_HOME} ]; then - sudo rm -rf ${DOVETAIL_HOME}/* -else - sudo mkdir -p ${DOVETAIL_HOME} -fi +[ -d ${DOVETAIL_HOME} ] && sudo rm -rf ${DOVETAIL_HOME} + +mkdir -p ${DOVETAIL_HOME} DOVETAIL_CONFIG=${DOVETAIL_HOME}/pre_config -sudo mkdir -p ${DOVETAIL_CONFIG} +mkdir -p ${DOVETAIL_CONFIG} sshkey="" # The path of openrc.sh is defined in fetch_os_creds.sh @@ -102,7 +100,8 @@ if [ "$INSTALLER_TYPE" == "fuel" ]; then fi # sdnvpn test case needs to download this image first before running -sudo wget -nc http://artifacts.opnfv.org/sdnvpn/ubuntu-16.04-server-cloudimg-amd64-disk1.img -P ${DOVETAIL_CONFIG} +echo "Download image ubuntu-16.04-server-cloudimg-amd64-disk1.img ..." +wget -q -nc http://artifacts.opnfv.org/sdnvpn/ubuntu-16.04-server-cloudimg-amd64-disk1.img -P ${DOVETAIL_CONFIG} opts="--privileged=true -id" -- cgit 1.2.3-korg