[Functest] Adapt set-functest-env to download OS images 05/37405/1
authorjose.lausuch <jose.lausuch@ericsson.com>
Thu, 13 Jul 2017 15:20:12 +0000 (17:20 +0200)
committerjose.lausuch <jose.lausuch@ericsson.com>
Thu, 13 Jul 2017 15:22:36 +0000 (17:22 +0200)
When [1] is ready and merged, we don't need to download the
OS images that are not needed for the deployed scenario.
The same filter applies to armband jobs.

[1] https://gerrit.opnfv.org/gerrit/#/c/37373/

Change-Id: I5813c738a8d9fa1262299cc50993557757f6d7e8
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
jjb/functest/set-functest-env.sh

index 5f936f5..5daefa2 100755 (executable)
@@ -21,6 +21,7 @@ fi
 
 DEPLOY_TYPE=baremetal
 [[ $BUILD_TAG =~ "virtual" ]] && DEPLOY_TYPE=virt
+HOST_ARCH=$(uname -m)
 
 echo "Functest: Start Docker and prepare environment"
 
@@ -28,7 +29,7 @@ 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}
+  ${WORKSPACE}/functest/ci/download_images.sh ${images_dir} ${DEPLOY_SCENARIO} ${HOST_ARCH} 2> ${redirect}
   images_vol="-v ${images_dir}:/home/opnfv/functest/images"
 fi
 
@@ -59,7 +60,6 @@ else
   volumes="${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}"
 fi
 
-HOST_ARCH=$(uname -m)
 FUNCTEST_IMAGE="opnfv/functest"
 if [ "$HOST_ARCH" = "aarch64" ]; then
     FUNCTEST_IMAGE="${FUNCTEST_IMAGE}_${HOST_ARCH}"