Run patrole test in Jenkins
[releng.git] / jjb / functest / functest-alpine.sh
index 3ad531b..541cc78 100755 (executable)
@@ -4,6 +4,10 @@ set -e
 set +u
 set +o pipefail
 
+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}
     echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..."
@@ -110,8 +114,12 @@ elif [[ ${INSTALLER_TYPE} == 'compass' ]]; then
 elif [[ ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_TYPE} == 'baremetal' ]]; then
     cacert_file_vol="-v ${HOME}/os_cacert:/etc/ssl/certs/mcp_os_cacert"
 fi
-rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/openstack.creds"
 
+if [[ ${BRANCH} == "stable/euphrates" ]]; then
+    rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/openstack.creds"
+else
+    rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/env_file"
+fi
 
 # 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
@@ -141,7 +149,8 @@ test -f ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG} && custom_params=$(ca
 
 envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
     -e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \
-    -e BUILD_TAG=${BUILD_TAG} -e DEPLOY_TYPE=${DEPLOY_TYPE}"
+    -e BUILD_TAG=${BUILD_TAG} -e DEPLOY_TYPE=${DEPLOY_TYPE} -e CI_LOOP=${CI_LOOP} \
+    -e TEST_DB_URL=${TEST_DB_URL} -e ENERGY_RECORDER_API_URL=${ENERGY_RECORDER_API_URL}"
 
 ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
 
@@ -168,9 +177,9 @@ if [[ ${DEPLOY_SCENARIO} =~ ^os-.* ]]; then
         run_tiers ${tiers}
     else
         if [ ${DEPLOY_TYPE} == 'baremetal' ]; then
-            tiers=(healthcheck smoke features vnf parser)
+            tiers=(healthcheck smoke patrole features vnf parser)
         else
-            tiers=(healthcheck smoke features)
+            tiers=(healthcheck smoke patrole features)
         fi
         run_tiers ${tiers}
     fi