X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Ffunctest%2Ffunctest-alpine.sh;h=8c29249e1b523cdd107f5a9195d649ece603e55b;hb=4818cd9300b643d2af764639593632f2074e62d3;hp=6f6e130f59c34ba53b2ade7ffc94724fcff0fd89;hpb=d2b0f38a91aecd4259a3b060553d1429ec5babe3;p=releng.git diff --git a/jjb/functest/functest-alpine.sh b/jjb/functest/functest-alpine.sh index 6f6e130f5..8c29249e1 100755 --- a/jjb/functest/functest-alpine.sh +++ b/jjb/functest/functest-alpine.sh @@ -8,13 +8,10 @@ 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 - -if [ -z $DOCKER_TAG ]; then - DOCKER_TAG=$([[ ${BRANCH##*/} == "master" ]] && echo "latest" || echo ${BRANCH##*/}) -fi +DOCKER_TAG=${DOCKER_TAG:-$([[ ${BRANCH##*/} == "master" ]] && echo "latest" || echo ${BRANCH##*/})} check_os_deployment() { - FUNCTEST_IMAGE=${REPO}/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 ${volumes} ${FUNCTEST_IMAGE} check_deployment" @@ -35,7 +32,7 @@ run_tiers() { cmd_opt="run_tests -r -t all" [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="run_tests -t all" for tier in ${tiers[@]}; do - FUNCTEST_IMAGE=${REPO}/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 ${envs} ${volumes} ${TESTCASE_OPTIONS} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" @@ -58,18 +55,16 @@ run_test() { cmd_opt="run_tests -t ${test_name}" # Determine which Functest image should be used for the test case case ${test_name} in - connection_check|tenantnetwork1|tenantnetwork2|vmready1|vmready2|singlevm1|singlevm2|vping_ssh|vping_userdata|cinder_test|odl|api_check|snaps_health_check) - FUNCTEST_IMAGE=${REPO}/functest-healthcheck:$DOCKER_TAG ;; - tempest_smoke_serial|tempest_smoke|neutron-tempest-plugin-api|rally_sanity|refstack_defcore|patrole|snaps_smoke|neutron_trunk|networking-bgpvpn|networking-sfc|barbican) - FUNCTEST_IMAGE=${REPO}/functest-smoke:$DOCKER_TAG ;; - shaker|vmtp) - FUNCTEST_IMAGE=${REPO}/functest-benchmarking:$DOCKER_TAG ;; - tempest_full_parallel|tempest_full|tempest_scenario|rally_full) - FUNCTEST_IMAGE=${REPO}/functest-components:$DOCKER_TAG ;; + connection_check|tenantnetwork1|tenantnetwork2|vmready1|vmready2|singlevm1|singlevm2|vping_ssh|vping_userdata|cinder_test|odl|api_check|snaps_health_check|tempest_smoke) + FUNCTEST_IMAGE=${REPO}/functest-healthcheck:${DOCKER_TAG} ;; + neutron-tempest-plugin-api|rally_sanity|refstack_defcore|tempest_full|tempest_scenario|patrole|snaps_smoke|neutron_trunk|networking-bgpvpn|networking-sfc|barbican) + FUNCTEST_IMAGE=${REPO}/functest-smoke:${DOCKER_TAG} ;; + rally_full|rally_jobs|shaker|vmtp) + FUNCTEST_IMAGE=${REPO}/functest-benchmarking:${DOCKER_TAG} ;; cloudify|cloudify_ims|heat_ims|vyos_vrouter|juju_epc) - FUNCTEST_IMAGE=${REPO}/functest-vnf:$DOCKER_TAG ;; + FUNCTEST_IMAGE=${REPO}/functest-vnf:${DOCKER_TAG} ;; doctor-notification|bgpvpn|functest-odl-sfc|barometercollectd|fds|vgpu|stor4nfv_os) - FUNCTEST_IMAGE=${REPO}/functest-features:$DOCKER_TAG ;; + FUNCTEST_IMAGE=${REPO}/functest-features:${DOCKER_TAG} ;; *) echo "Unkown test case $test_name" exit 1 @@ -87,7 +82,7 @@ run_test() { } -[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" +redirect="/dev/stdout" FUNCTEST_DIR=/home/opnfv/functest DEPLOY_TYPE=baremetal [[ $BUILD_TAG =~ "virtual" ]] && DEPLOY_TYPE=virt @@ -101,7 +96,7 @@ if [[ ${INSTALLER_TYPE} == 'joid' ]]; then elif [[ ${INSTALLER_TYPE} == 'compass' ]]; then cacert_file_vol="-v ${HOME}/os_cacert:${FUNCTEST_DIR}/conf/os_cacert" echo "export OS_CACERT=${FUNCTEST_DIR}/conf/os_cacert" >> ${HOME}/opnfv-openrc.sh -elif [[ ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_TYPE} == 'baremetal' ]]; then +elif [[ ${INSTALLER_TYPE} == 'fuel' ]] && [[ "${DEPLOY_SCENARIO}" =~ -ha$ ]]; then cacert_file_vol="-v ${HOME}/os_cacert:/etc/ssl/certs/mcp_os_cacert" fi @@ -112,10 +107,6 @@ echo "Functest: Start Docker and prepare environment" echo "Functest: Download images that will be used by test cases" images_dir="${HOME}/opnfv/functest/images" 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} @@ -126,7 +117,7 @@ mkdir -p ${dir_result} sudo rm -rf ${dir_result}/* results_vol="-v ${dir_result}:${FUNCTEST_DIR}/results" custom_params= -test -f ${HOME}/opnfv/functest/custom/params_$DOCKER_TAG && custom_params=$(cat ${HOME}/opnfv/functest/custom/params_$DOCKER_TAG) +test -f ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG} && custom_params=$(cat ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG}) envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ -e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \ @@ -157,6 +148,10 @@ if [[ ${INSTALLER_TYPE} == 'compass' && ${DEPLOY_SCENARIO} =~ 'sfc' ]]; then envs="${envs} -e EXTERNAL_NETWORK=${EXTERNAL_NETWORK}" fi +if [[ ${INSTALLER_TYPE} == 'compass' ]] || [[ ${DEPLOY_SCENARIO} == *"odl"* ]]; then + envs="${envs} -e SDN_CONTROLLER_RESTCONFPORT=8080" +fi + if [[ ${DEPLOY_SCENARIO} == *"ovs"* ]] || [[ ${DEPLOY_SCENARIO} == *"fdio"* ]]; then if [[ -n ${IMAGE_PROPERTIES} ]]; then IMAGE_PROPERTIES="${IMAGE_PROPERTIES},hw_mem_page_size:large" @@ -266,12 +261,14 @@ elif [ ${FUNCTEST_MODE} == 'tier' ]; then tiers=(${FUNCTEST_TIER}) run_tiers ${tiers} else - tests=(tempest_full tempest_scenario) + tests=() skip_tests=0 if [ ${DEPLOY_TYPE} == 'baremetal' ] && [ "${HOST_ARCH}" != "aarch64" ]; then if [[ ${BRANCH} == "stable/fraser" ]]; then tiers=(healthcheck smoke features vnf parser) tests=(tempest_full_parallel) + elif [[ ${BRANCH} == "stable/gambia" ]]; then + tiers=(healthcheck smoke benchmarking features vnf components) else tiers=(healthcheck smoke benchmarking features vnf) fi @@ -279,6 +276,8 @@ else if [[ ${BRANCH} == "stable/fraser" ]]; then tiers=(healthcheck smoke features parser) tests=(tempest_full_parallel) + elif [[ ${BRANCH} == "stable/gambia" ]]; then + tiers=(healthcheck smoke benchmarking features vnf components) else tiers=(healthcheck smoke benchmarking features) fi