diff options
Diffstat (limited to 'jjb/functest')
-rw-r--r-- | jjb/functest/functest.yml | 30 | ||||
-rw-r--r-- | jjb/functest/res-build.sh | 6 |
2 files changed, 26 insertions, 10 deletions
diff --git a/jjb/functest/functest.yml b/jjb/functest/functest.yml index c45fdb2c0..e1dff72e4 100644 --- a/jjb/functest/functest.yml +++ b/jjb/functest/functest.yml @@ -16,7 +16,7 @@ - orange-pod2: installer: joid - huawei-us-deploy-bare-1: - installer: compass4nfv + installer: compass - intel-pod5: installer: joid @@ -132,6 +132,10 @@ name: FUNCTEST_REPO_DIR default: "/home/opnfv/repos/functest" description: "Directory where the Functest repository is cloned" + - string: + name: PUSH_RESULTS_TO_DB + default: "true" + description: "Push the results of all the tests to the resultDB" ######################## # trigger macros ######################## @@ -148,7 +152,7 @@ - 'functest-cleanup' - 'set-functest-env' - 'functest-all' -# - 'functest-store-results' + - 'functest-store-results' - builder: name: functest-suite-builder @@ -156,9 +160,12 @@ - shell: | #!/bin/bash set +e - + flag="" + if [ "${PUSH_RESULTS_TO_DB}" == "true" ]; then + flag="-r" + fi echo "Functest: run $FUNCTEST_SUITE_NAME" - cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME" + cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME ${flag}" container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) docker exec $container_id $cmd @@ -168,9 +175,12 @@ - shell: | #!/bin/bash set +e - + flag="" + if [ "${PUSH_RESULTS_TO_DB}" == "true" ]; then + flag="-r" + fi echo "Functest: running all the tests" - cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh" + cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh ${flag}" container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) docker exec $container_id $cmd @@ -194,8 +204,14 @@ labconfig="-v ${LAB_CONFIG}:/home/opnfv/functest/conf/openstack.creds" fi + dir_result="${HOME}/opnfv/functest/reports" + mkdir -f ${dir_result} + rm -rf ${dir_result}/* + + $res_volume="-v ${dir_result}:/home/opnfv/functest/results" + docker pull opnfv/functest:latest_stable - cmd="docker run -id -e $envs ${labconfig} ${sshkey} opnfv/functest:latest_stable /bin/bash" + cmd="docker run -id -e $envs ${labconfig} ${sshkey} ${res_volume} opnfv/functest:latest_stable /bin/bash" echo "Functest: Running docker run command: ${cmd}" ${cmd} docker ps -a diff --git a/jjb/functest/res-build.sh b/jjb/functest/res-build.sh index a9c5dbe1b..9d425773d 100644 --- a/jjb/functest/res-build.sh +++ b/jjb/functest/res-build.sh @@ -7,9 +7,9 @@ export PATH=$PATH:/usr/local/bin/ git_sha1="$(git rev-parse HEAD)" res_build_date=$(date -u +"%Y-%m-%d_%H-%M-%S") -# Result directory in the docker file +# Result directory in the jumphost # to be used only with CI -dir_result="/home/opnfv/functest/results" +dir_result="${HOME}/opnfv/functest/reports" # Clean the results directory # remove json file for rally, export only html @@ -20,7 +20,7 @@ rm -f $dir_result/rally/*.json # date is generated by functest so on the artifact, the results shall be under functest/<testbed id>/date/ testbed=$NODE_NAME -project_artifact=functest/$testbed/$res_build_date +project_artifact=logs/functest/$testbed/$res_build_date # copy folder to artifact if [ -d "$dir_result" ]; then |