Create an initial file for return value
[releng.git] / jjb / functest / functest-k8.sh
index 3f08e4a..e331f44 100755 (executable)
@@ -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"
@@ -46,6 +46,8 @@ envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} \
 
 DOCKER_TAG=`[[ ${BRANCH##*/} == "master" ]] && echo "latest" || echo ${BRANCH##*/}`
 
+set +e
+
 FUNCTEST_IMAGE=opnfv/functest-kubernetes:${DOCKER_TAG}
 echo "Pulling Docker image ${FUNCTEST_IMAGE} ..."
 docker pull ${FUNCTEST_IMAGE}>/dev/null
@@ -54,6 +56,9 @@ cmd="docker run --rm --privileged=true ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin
 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