Merge "Add parameters in init function"
[releng.git] / jjb / dovetail / dovetail-run.sh
index 6453425..098b7db 100755 (executable)
@@ -34,6 +34,10 @@ fi
 
 opts="--privileged=true --rm"
 envs="-e CI_DEBUG=${CI_DEBUG} \
+      -e INSTALLER_TYPE=${INSTALLER_TYPE} \
+      -e INSTALLER_IP=${INSTALLER_IP} \
+      -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \
+      -e DEPLOY_TYPE=${DEPLOY_TYPE} \
       -v /var/run/docker.sock:/var/run/docker.sock \
       -v /home/opnfv/dovetail/results:/home/opnfv/dovetail/results"
 
@@ -44,9 +48,12 @@ docker pull opnfv/dovetail:$DOCKER_TAG >$redirect
 # Run docker
 echo "Dovetail: docker running..."
 sudo docker run ${opts} ${envs} ${labconfig} ${sshkey} opnfv/dovetail:${DOCKER_TAG} \
-"/home/opnfv/dovetail/scripts/run.py"
+"/home/opnfv/dovetail/dovetail/run.py"
 
 echo "Dovetail: store results..."
 sudo cp -r /home/opnfv/dovetail/results ./
+#To make sure the file owner is jenkins, for the copied results files in the above line
+#if not, there will be error when next time to wipe workspace
+sudo chown -R jenkins:jenkins ${WORKSPACE}/results
 
 echo "Dovetail: done!"