X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Ffunctest%2Ffunctest-alpine.sh;h=31cdd749c4c0c0c7da38307c2685776d82cb6da8;hb=e6df54e8395a583e7d841269a3f0e9cac9c21b7d;hp=440b00af94f9445794beeef781b204132d6a3197;hpb=e5ce0b5f77f47b8b18354697e8d21a3885502915;p=releng.git diff --git a/jjb/functest/functest-alpine.sh b/jjb/functest/functest-alpine.sh index 440b00af9..31cdd749c 100755 --- a/jjb/functest/functest-alpine.sh +++ b/jjb/functest/functest-alpine.sh @@ -4,15 +4,16 @@ set -e set +u set +o pipefail +REPO=${REPO:-opnfv} CI_LOOP=${CI_LOOP:-daily} TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results ENERGY_RECORDER_API_URL=http://energy.opnfv.fr/resources check_os_deployment() { - FUNCTEST_IMAGE=opnfv/functest-healthcheck:${DOCKER_TAG} + FUNCTEST_IMAGE=${REPO}/functest-healthcheck:${DOCKER_TAG} echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..." docker pull ${FUNCTEST_IMAGE}>/dev/null - cmd="docker run --rm --privileged=true ${volumes} ${FUNCTEST_IMAGE} check_deployment" + cmd="docker run --rm ${volumes} ${FUNCTEST_IMAGE} check_deployment" echo "Checking deployment, CMD: ${cmd}" eval ${cmd} ret_value=$? @@ -34,10 +35,10 @@ run_tiers() { echo 0 > ${ret_val_file} for tier in ${tiers[@]}; do - FUNCTEST_IMAGE=opnfv/functest-${tier}:${DOCKER_TAG} + FUNCTEST_IMAGE=${REPO}/functest-${tier}:${DOCKER_TAG} echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..." docker pull ${FUNCTEST_IMAGE}>/dev/null - cmd="docker run --rm --privileged=true ${envs} ${volumes} ${TESTCASE_OPTIONS} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" + cmd="docker run --rm ${envs} ${volumes} ${TESTCASE_OPTIONS} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" echo "Running Functest tier '${tier}'. CMD: ${cmd}" eval ${cmd} ret_value=$? @@ -59,17 +60,17 @@ run_test() { # Determine which Functest image should be used for the test case case ${test_name} in connection_check|api_check|snaps_health_check) - FUNCTEST_IMAGE=opnfv/functest-healthcheck:${DOCKER_TAG} ;; + FUNCTEST_IMAGE=${REPO}/functest-healthcheck:${DOCKER_TAG} ;; vping_ssh|vping_userdata|tempest_smoke_serial|rally_sanity|refstack_defcore|odl|odl_netvirt|snaps_smoke) - FUNCTEST_IMAGE=opnfv/functest-smoke:${DOCKER_TAG} ;; + FUNCTEST_IMAGE=${REPO}/functest-smoke:${DOCKER_TAG} ;; tempest_full_parallel|rally_full) - FUNCTEST_IMAGE=opnfv/functest-components:${DOCKER_TAG} ;; + FUNCTEST_IMAGE=${REPO}/functest-components:${DOCKER_TAG} ;; cloudify_ims|orchestra_openims|orchestra_clearwaterims|vyos_vrouter) - FUNCTEST_IMAGE=opnfv/functest-vnf:${DOCKER_TAG} ;; + FUNCTEST_IMAGE=${REPO}/functest-vnf:${DOCKER_TAG} ;; promise|doctor-notification|bgpvpn|functest-odl-sfc|domino-multinode|barometercollectd|fds) - FUNCTEST_IMAGE=opnfv/functest-features:${DOCKER_TAG} ;; + FUNCTEST_IMAGE=${REPO}/functest-features:${DOCKER_TAG} ;; parser-basics) - FUNCTEST_IMAGE=opnfv/functest-parser:${DOCKER_TAG} ;; + FUNCTEST_IMAGE=${REPO}/functest-parser:${DOCKER_TAG} ;; *) echo "Unkown test case $test_name" exit 1 @@ -77,7 +78,7 @@ run_test() { esac echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..." docker pull ${FUNCTEST_IMAGE}>/dev/null - cmd="docker run --rm --privileged=true ${envs} ${volumes} ${TESTCASE_OPTIONS} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" + cmd="docker run --rm ${envs} ${volumes} ${TESTCASE_OPTIONS} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" echo "Running Functest test case '${test_name}'. CMD: ${cmd}" eval ${cmd} ret_value=$? @@ -108,11 +109,6 @@ fi rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/env_file" -# 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 -fi - echo "Functest: Start Docker and prepare environment" echo "Functest: Download images that will be used by test cases" @@ -172,10 +168,18 @@ elif [ ${FUNCTEST_MODE} == 'tier' ]; then tiers=(${FUNCTEST_TIER}) run_tiers ${tiers} else - if [ ${DEPLOY_TYPE} == 'baremetal' ]; then - tiers=(healthcheck smoke features vnf parser) + if [ ${DEPLOY_TYPE} == 'baremetal' ] && [ "${HOST_ARCH}" != "aarch64" ]; then + if [[ ${BRANCH} == "stable/fraser" ]]; then + tiers=(healthcheck smoke features vnf parser) + else + tiers=(healthcheck smoke features vnf) + fi else - tiers=(healthcheck smoke features) + if [[ ${BRANCH} == "stable/fraser" ]]; then + tiers=(healthcheck smoke features parser) + else + tiers=(healthcheck smoke features) + fi fi run_tiers ${tiers} fi