Merge "substitute with testapi img"
[releng.git] / jjb / dovetail / dovetail-run.sh
index 5a81c54..dce7e58 100755 (executable)
@@ -6,7 +6,7 @@
 set -e
 [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
 
-DOVETAIL_HOME=/home/opnfv/cvp
+DOVETAIL_HOME=${WORKSPACE}/cvp
 if [ -d ${DOVETAIL_HOME} ]; then
     sudo rm -rf ${DOVETAIL_HOME}/*
 else
@@ -54,7 +54,8 @@ if [[ -f $OPENRC ]]; then
     echo "INFO: openstack credentials path is $OPENRC"
     cat $OPENRC
 else
-    echo "ERROR: file $OPENRC does not exist."
+    echo "ERROR: cannot find file $OPENRC. Please check if it is existing."
+    sudo ls -al ${DOVETAIL_CONFIG}
     exit 1
 fi
 
@@ -88,7 +89,8 @@ if [ -f ${DOVETAIL_CONFIG}/pod.yaml ]; then
     echo "file ${DOVETAIL_CONFIG}/pod.yaml:"
     cat ${DOVETAIL_CONFIG}/pod.yaml
 else
-    echo "Error: There doesn't exist file ${DOVETAIL_CONFIG}/pod.yaml."
+    echo "Error: cannot find file ${DOVETAIL_CONFIG}/pod.yaml. Please check if it is existing."
+    sudo ls -al ${DOVETAIL_CONFIG}
     echo "HA test cases may not run properly."
 fi
 
@@ -99,6 +101,9 @@ if [ "$INSTALLER_TYPE" == "fuel" ]; then
     sshpass -p r00tme sudo scp $ssh_options root@${INSTALLER_IP}:~/.ssh/id_rsa ${DOVETAIL_CONFIG}/id_rsa
 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}
+
 opts="--privileged=true -id"
 
 docker_volume="-v /var/run/docker.sock:/var/run/docker.sock"