diff options
author | xudan <xudan16@huawei.com> | 2017-06-25 21:46:35 -0400 |
---|---|---|
committer | xudan <xudan16@huawei.com> | 2017-06-25 23:37:24 -0400 |
commit | 43158353fe6fd5b5e890c5f65e6c3a94f458c2e9 (patch) | |
tree | 5b076fe0ada696ef1764bf321afddaee8f765384 | |
parent | cebfb874b5d9e759f9d97f8eee9d1d0a2dfab8ce (diff) |
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 <xudan16@huawei.com>
-rwxr-xr-x | jjb/dovetail/dovetail-run.sh | 13 |
1 files 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" |