summaryrefslogtreecommitdiffstats
path: root/jjb/functest
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/functest')
-rw-r--r--jjb/functest/functest-ci-jobs.yml1
-rw-r--r--jjb/functest/functest-exit.sh5
-rwxr-xr-xjjb/functest/functest-loop.sh6
-rw-r--r--jjb/functest/functest-project-jobs.yml1
-rwxr-xr-xjjb/functest/functest-suite.sh7
-rwxr-xr-xjjb/functest/set-functest-env.sh7
6 files changed, 11 insertions, 16 deletions
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index a688cab29..7478e2a86 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -220,7 +220,6 @@
parameters:
- project-parameter:
project: '{project}'
- - gerrit-parameter:
branch: '{branch}'
- '{installer}-defaults'
- '{slave-label}-defaults'
diff --git a/jjb/functest/functest-exit.sh b/jjb/functest/functest-exit.sh
index 10edab005..925a3cfbb 100644
--- a/jjb/functest/functest-exit.sh
+++ b/jjb/functest/functest-exit.sh
@@ -1,7 +1,6 @@
#!/bin/bash
-branch=${GIT_BRANCH##*/}
-ret_val_file="${HOME}/opnfv/functest/results/${branch}/return_value"
+ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value"
if [ ! -f ${ret_val_file} ]; then
echo "Return value not found!"
exit -1
@@ -9,4 +8,4 @@ fi
ret_val=`cat ${ret_val_file}`
-exit ${ret_val} \ No newline at end of file
+exit ${ret_val}
diff --git a/jjb/functest/functest-loop.sh b/jjb/functest/functest-loop.sh
index 4528c00d1..893c428a2 100755
--- a/jjb/functest/functest-loop.sh
+++ b/jjb/functest/functest-loop.sh
@@ -3,9 +3,9 @@ set +e
branch=${GIT_BRANCH##*/}
[[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+="-r"
-if [[ ${branch} == *"brahmaputra"* ]]; then
+if [[ "$BRANCH" =~ 'brahmaputra' ]]; then
cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh -s ${flags}"
-elif [[ ${branch} == *"colorado"* ]]; then
+elif [[ "$BRANCH" =~ 'colorado' ]]; then
cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t all ${flags}"
else
cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/run_tests.py -t all ${flags}"
@@ -14,7 +14,7 @@ container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
docker exec $container_id $cmd
ret_value=$?
-ret_val_file="${HOME}/opnfv/functest/results/${branch}/return_value"
+ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value"
echo ${ret_value}>${ret_val_file}
exit 0
diff --git a/jjb/functest/functest-project-jobs.yml b/jjb/functest/functest-project-jobs.yml
index 6a0768c9c..42c19a777 100644
--- a/jjb/functest/functest-project-jobs.yml
+++ b/jjb/functest/functest-project-jobs.yml
@@ -28,7 +28,6 @@
parameters:
- project-parameter:
project: '{project}'
- - gerrit-parameter:
branch: '{branch}'
- 'opnfv-build-ubuntu-defaults'
diff --git a/jjb/functest/functest-suite.sh b/jjb/functest/functest-suite.sh
index 9dc8deca0..28d7e3d10 100755
--- a/jjb/functest/functest-suite.sh
+++ b/jjb/functest/functest-suite.sh
@@ -1,11 +1,10 @@
#!/bin/bash
set -e
-branch=${GIT_BRANCH##*/}
-echo "Functest: run $FUNCTEST_SUITE_NAME on branch ${branch}"
-if [[ ${branch} == *"brahmaputra"* ]]; then
+echo "Functest: run $FUNCTEST_SUITE_NAME on branch $BRANCH"
+if [[ "$BRANCH" =~ 'brahmaputra' ]]; then
cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME"
-elif [[ ${branch} == *"colorado"* ]]; then
+elif [[ "$BRANCH" =~ 'colorado' ]]; then
cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t $FUNCTEST_SUITE_NAME"
else
cmd="functest testcase run $FUNCTEST_SUITE_NAME"
diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh
index 583ce8041..afd656f52 100755
--- a/jjb/functest/set-functest-env.sh
+++ b/jjb/functest/set-functest-env.sh
@@ -56,8 +56,7 @@ DEPLOY_TYPE=baremetal
echo "Functest: Start Docker and prepare environment"
-branch=${GIT_BRANCH##*/}
-dir_result="${HOME}/opnfv/functest/results/${branch}"
+dir_result="${HOME}/opnfv/functest/results/${BRANCH##*/}"
mkdir -p ${dir_result}
sudo rm -rf ${dir_result}/*
results_vol="-v ${dir_result}:/home/opnfv/functest/results"
@@ -96,9 +95,9 @@ if [ $(docker ps | grep "opnfv/functest:${DOCKER_TAG}" | wc -l) == 0 ]; then
echo "The container opnfv/functest with ID=${container_id} has not been properly started. Exiting..."
exit 1
fi
-if [[ ${branch} == *"brahmaputra"* ]]; then
+if [[ "$BRANCH" =~ 'brahmaputra' ]]; then
cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh"
-elif [[ ${branch} == *"colorado"* ]]; then
+elif [[ "$BRANCH" =~ 'colorado' ]]; then
cmd="python ${FUNCTEST_REPO_DIR}/ci/prepare_env.py start"
else
cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/prepare_env.py start"