From 8a74d4b1c29c9aa067c5c5394fd4c545795b8eb4 Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Fri, 29 Apr 2016 14:36:38 +0200 Subject: Functest, differenciate commands for stable and for master Change-Id: If3f8b0666617c32d9945bd7ca72090bb86fcb250 Signed-off-by: jose.lausuch --- jjb/functest/functest-ci-jobs.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml index 20f5f300e..2b2897471 100644 --- a/jjb/functest/functest-ci-jobs.yml +++ b/jjb/functest/functest-ci-jobs.yml @@ -222,7 +222,12 @@ #!/bin/bash set -e echo "Functest: run $FUNCTEST_SUITE_NAME" - cmd="${FUNCTEST_REPO_DIR}/ci/run_tests.py -t $FUNCTEST_SUITE_NAME" + branch=${GIT_BRANCH##*/} + if [[ "${branch}" == "master" ]]; then + cmd="${FUNCTEST_REPO_DIR}/ci/run_tests.py -t $FUNCTEST_SUITE_NAME" + else: + cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME" + fi container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) docker exec $container_id $cmd @@ -232,8 +237,13 @@ - shell: | #!/bin/bash set +e + branch=${GIT_BRANCH##*/} [[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+="-r" - cmd="${FUNCTEST_REPO_DIR}/ci/run_tests.py -t all ${flags}" + if [[ "${branch}" == "master" ]]; then + cmd="${FUNCTEST_REPO_DIR}/ci/run_tests.py -t all ${flags}" + else: + cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh -s ${flags}" + fi container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) docker exec $container_id $cmd @@ -305,7 +315,11 @@ echo "The container opnfv/functest with ID=${container_id} has not been properly started. Exiting..." exit 1 fi - cmd="python ${FUNCTEST_REPO_DIR}/ci/prepare_env.py start" + if [[ "${branch}" == "master" ]]; then + cmd="python ${FUNCTEST_REPO_DIR}/ci/prepare_env.py start" + else: + cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh" + fi echo "Executing command inside the docker: ${cmd}" docker exec ${container_id} ${cmd} -- cgit 1.2.3-korg