Functest: fixes downloading images for danube branch 21/35221/1
authorTim Rozet <trozet@redhat.com>
Tue, 23 May 2017 16:13:36 +0000 (12:13 -0400)
committerTim Rozet <trozet@redhat.com>
Tue, 23 May 2017 16:14:23 +0000 (12:14 -0400)
The script for downloading images "download_images.sh" does not exist in
stable/danube for functest.  Therefore we revert to old behavior for
that branch.

Change-Id: Id94f3db27fd5b71bb981007472b55fadae0e5394
Signed-off-by: Tim Rozet <trozet@redhat.com>
jjb/functest/set-functest-env.sh

index f581f26..155281e 100755 (executable)
@@ -51,11 +51,13 @@ DEPLOY_TYPE=baremetal
 
 echo "Functest: Start Docker and prepare environment"
 
-echo "Functest: Download images that will be used by test cases"
-images_dir="${HOME}/opnfv/functest/images"
-chmod +x ${WORKSPACE}/functest/ci/download_images.sh
-${WORKSPACE}/functest/ci/download_images.sh ${images_dir} 2> ${redirect}
-images_vol="-v ${images_dir}:/home/opnfv/functest/images"
+if [ "$BRANCH" != 'stable/danube' ]; then
+  echo "Functest: Download images that will be used by test cases"
+  images_dir="${HOME}/opnfv/functest/images"
+  chmod +x ${WORKSPACE}/functest/ci/download_images.sh
+  ${WORKSPACE}/functest/ci/download_images.sh ${images_dir} 2> ${redirect}
+  images_vol="-v ${images_dir}:/home/opnfv/functest/images"
+fi
 
 dir_result="${HOME}/opnfv/functest/results/${BRANCH##*/}"
 mkdir -p ${dir_result}
@@ -78,7 +80,11 @@ if [[ ${INSTALLER_TYPE} == 'compass' && ${DEPLOY_SCENARIO} == *'os-nosdn-openo-h
     envs=${env}" -e OPENO_MSB_ENDPOINT=${openo_msb_endpoint}"
 fi
 
-volumes="${images_vol} ${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}"
+if [ "$BRANCH" != 'stable/danube' ]; then
+  volumes="${images_vol} ${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}"
+else
+  volumes="${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}"
+fi
 
 HOST_ARCH=$(uname -m)
 FUNCTEST_IMAGE="opnfv/functest"