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} ${DEPLOY_SCENARIO} ${HOST_ARCH} 2> ${redirect}
+download_script=${WORKSPACE}/functest/ci/download_images.sh
+if [[ ! -f ${download_script} ]]; then
+ # to support Danube as well
+ wget https://git.opnfv.org/functest/plain/functest/ci/download_images.sh -O ${download_script} 2> ${redirect}
+fi
+chmod +x ${download_script}
+${download_script} ${images_dir} ${DEPLOY_SCENARIO} ${HOST_ARCH} 2> ${redirect}
+
images_vol="-v ${images_dir}:${FUNCTEST_DIR}/images"
dir_result="${HOME}/opnfv/functest/results/${BRANCH##*/}"
envs=${env}" -e OPENO_MSB_ENDPOINT=${openo_msb_endpoint}"
fi
-volumes="${images_vol} ${results_vol} ${sshkey_vol} ${rc_file_vol}"
+volumes="${images_vol} ${results_vol} ${sshkey_vol} ${rc_file_vol} ${cacert_file_vol}"
+
+set +e
+
+if [ ${FUNCTEST_SUITE_NAME} == 'healthcheck' ]; then
+ tiers=(healthcheck)
+else
+ tiers=(healthcheck smoke features vnf)
+fi
+cmd_opt='prepare_env start && run_tests -r -t all'
-tiers=(healthcheck smoke)
for tier in ${tiers[@]}; do
FUNCTEST_IMAGE=opnfv/functest-${tier}
echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..."
docker pull ${FUNCTEST_IMAGE}>/dev/null
- cmd="docker run ${envs} ${volumes} ${FUNCTEST_IMAGE}"
+ cmd="docker run ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'"
echo "Running Functest tier '${tier}'. CMD: ${cmd}"
- ${cmd}
+ eval ${cmd}
done