summaryrefslogtreecommitdiffstats
path: root/jjb/functest
diff options
context:
space:
mode:
authorhelenyao <yaohelan@huawei.com>2017-05-08 15:41:48 +0800
committerhelenyao <yaohelan@huawei.com>2017-05-19 15:04:35 +0800
commit2b297615ca7a994eb69ef16e52d6a61624e62aa4 (patch)
tree545d7bf479782f3387ec724499d3bdc633e14ec9 /jjb/functest
parent87bdf551e4449d6650712702c0cbe1595b33d5c8 (diff)
Download images and map the folder to container
This patch is to accommadate with the change in patch[1] Before running the Functest Docker container, downloading all required images first and map the folder to the container [1] https://gerrit.opnfv.org/gerrit/#/c/34033 Change-Id: I617bd988caf1fd354cf9ef675661d40742b693c6 Signed-off-by: helenyao <yaohelan@huawei.com>
Diffstat (limited to 'jjb/functest')
-rwxr-xr-xjjb/functest/set-functest-env.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh
index 569f371c4..72412eafc 100755
--- a/jjb/functest/set-functest-env.sh
+++ b/jjb/functest/set-functest-env.sh
@@ -48,7 +48,6 @@ if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
fi
-
# Set iptables rule to allow forwarding return traffic for container
if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FORWARD | awk 'NR==3' | grep RETURN 2> ${redirect}; then
sudo iptables -I FORWARD -j RETURN
@@ -59,6 +58,12 @@ 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}
+images_vol="-v ${images_dir}:/home/opnfv/functest/images"
+
dir_result="${HOME}/opnfv/functest/results/${BRANCH##*/}"
mkdir -p ${dir_result}
sudo rm -rf ${dir_result}/*
@@ -80,7 +85,7 @@ if [[ ${INSTALLER_TYPE} == 'compass' && ${DEPLOY_SCENARIO} == *'os-nosdn-openo-h
envs=${env}" -e OPENO_MSB_ENDPOINT=${openo_msb_endpoint}"
fi
-volumes="${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}"
+volumes="${images_vol} ${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}"
HOST_ARCH=$(uname -m)
FUNCTEST_IMAGE="opnfv/functest"
@@ -88,7 +93,7 @@ if [ "$HOST_ARCH" = "aarch64" ]; then
FUNCTEST_IMAGE="${FUNCTEST_IMAGE}_${HOST_ARCH}"
fi
-echo "Functest: Pulling image ${FUNCTEST_IMAGE}:${DOCKER_TAG}"
+echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE}:${DOCKER_TAG}"
docker pull ${FUNCTEST_IMAGE}:$DOCKER_TAG >/dev/null
cmd="sudo docker run --privileged=true -id ${envs} ${volumes} \