From: Fatih Degirmenci Date: Mon, 19 Mar 2018 13:53:52 +0000 (+0000) Subject: Merge "xci: Make post merge job common across all scenarios" X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=07476a814f2ece7e07f36d14d9714141a98a7e01;hp=9dccbc7d59862b2c381fddcf4e6d6710ea2775d0;p=releng.git Merge "xci: Make post merge job common across all scenarios" --- diff --git a/jjb/functest/functest-k8.sh b/jjb/functest/functest-k8.sh index 115ff4219..49d7163a9 100755 --- a/jjb/functest/functest-k8.sh +++ b/jjb/functest/functest-k8.sh @@ -19,7 +19,7 @@ if [[ ${INSTALLER_TYPE} == 'compass' ]]; then KUBE_MASTER_IP=$(echo $KUBE_MASTER_URL|awk -F'https://|:[0-9]+' '$0=$2') echo "export KUBE_MASTER_IP=$KUBE_MASTER_IP" >> $rc_file elif [[ ${INSTALLER_TYPE} == 'joid' && ${BRANCH} == 'master' ]]; then - admin_conf_file_vol="-v ${HOME}/joid_config/config:/root/joid_config/config" + admin_conf_file_vol="-v ${HOME}/joid_config/config:/root/.kube/config" rc_file=${HOME}/joid_config/k8config else echo "Not supported by other installers yet" @@ -35,11 +35,6 @@ results_vol="-v ${dir_result}:${FUNCTEST_DIR}/results" volumes="${rc_file_vol} ${results_vol} ${admin_conf_file_vol}" -# 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 - envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} \ -e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \ -e BUILD_TAG=${BUILD_TAG} -e DEPLOY_TYPE=${DEPLOY_TYPE}" @@ -52,10 +47,13 @@ FUNCTEST_IMAGE=opnfv/functest-kubernetes:${DOCKER_TAG} echo "Pulling Docker image ${FUNCTEST_IMAGE} ..." docker pull ${FUNCTEST_IMAGE}>/dev/null cmd_opt="run_tests -r -t all" -cmd="docker run --rm --privileged=true ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" +cmd="docker run --rm ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" echo "Running Functest k8s test cases, CMD: ${cmd}" eval ${cmd} ret_value=$? + +ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" +echo 0 > ${ret_val_file} if [ ${ret_value} != 0 ]; then echo ${ret_value} > ${ret_val_file} fi