X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Ffunctest%2Fset-functest-env.sh;h=b84ca6be41147330ac93b36cda5eec160684f7a0;hb=17ff08645fc8e6e8b2c0bc22152f2cab44d3f92b;hp=01cab5e0f9e9ac7b604e098c247eefb14359cdea;hpb=e5b452dfa55f8fb7a6bcc6895ae4c671b1c871cb;p=releng.git diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh index 01cab5e0f..b84ca6be4 100755 --- a/jjb/functest/set-functest-env.sh +++ b/jjb/functest/set-functest-env.sh @@ -9,6 +9,10 @@ set +o pipefail # Prepare OpenStack credentials volume if [[ ${INSTALLER_TYPE} == 'joid' ]]; then rc_file_vol="-v $LAB_CONFIG/admin-openrc:/home/opnfv/functest/conf/openstack.creds" +elif [[ ${INSTALLER_TYPE} == 'compass' && ${BRANCH} == 'master' ]]; then + cacert_file_vol="-v ${HOME}/os_cacert:/home/opnfv/functest/conf/os_cacert" + echo "export OS_CACERT=/home/opnfv/functest/conf/os_cacert" >> ${HOME}/opnfv-openrc.sh + rc_file_vol="-v ${HOME}/opnfv-openrc.sh:/home/opnfv/functest/conf/openstack.creds" else rc_file_vol="-v ${HOME}/opnfv-openrc.sh:/home/opnfv/functest/conf/openstack.creds" fi @@ -21,6 +25,7 @@ fi DEPLOY_TYPE=baremetal [[ $BUILD_TAG =~ "virtual" ]] && DEPLOY_TYPE=virt +HOST_ARCH=$(uname -m) echo "Functest: Start Docker and prepare environment" @@ -28,8 +33,9 @@ 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} images_vol="-v ${images_dir}:/home/opnfv/functest/images" + echo "Functest: Images successfully downloaded" fi dir_result="${HOME}/opnfv/functest/results/${BRANCH##*/}" @@ -38,6 +44,7 @@ sudo rm -rf ${dir_result}/* results_vol="-v ${dir_result}:/home/opnfv/functest/results" custom_params= test -f ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG} && custom_params=$(cat ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG}) +echo "Functest: custom parameters successfully retrieved: ${custom_params}" envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ -e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \ @@ -54,12 +61,13 @@ if [[ ${INSTALLER_TYPE} == 'compass' && ${DEPLOY_SCENARIO} == *'os-nosdn-openo-h fi if [ "$BRANCH" != 'stable/danube' ]; then - volumes="${images_vol} ${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}" + volumes="${images_vol} ${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol} ${cacert_file_vol}" else volumes="${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}" fi -HOST_ARCH=$(uname -m) +echo "Functest: volumes defined" + FUNCTEST_IMAGE="opnfv/functest" if [ "$HOST_ARCH" = "aarch64" ]; then FUNCTEST_IMAGE="${FUNCTEST_IMAGE}_${HOST_ARCH}" @@ -90,7 +98,12 @@ if [ $(docker ps | grep "${FUNCTEST_IMAGE}:${DOCKER_TAG}" | wc -l) == 0 ]; then exit 1 fi -cmd="prepare_env start" +if [ "$BRANCH" == 'master' ]; then + cmd="prepare_env start" +else + cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/prepare_env.py start" +fi + echo "Executing command inside the docker: ${cmd}" docker exec ${container_id} ${cmd}