diff options
Diffstat (limited to 'jjb/functest')
-rw-r--r-- | jjb/functest/functest-ci-jobs.yml | 50 | ||||
-rw-r--r-- | jjb/functest/res-build.sh | 39 |
2 files changed, 37 insertions, 52 deletions
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml index 2b91ed692..01e1885cb 100644 --- a/jjb/functest/functest-ci-jobs.yml +++ b/jjb/functest/functest-ci-jobs.yml @@ -13,28 +13,39 @@ stream: master branch: '{stream}' gs-pathname: '' + docker-tag: 'latest' brahmaputra: &brahmaputra stream: brahmaputra branch: 'stable/{stream}' gs-pathname: '/{stream}' + docker-tag: 'brahmaputra.1.0' #-------------------------------- # POD, INSTALLER, AND BRANCH MAPPING #-------------------------------- # brahmaputra #-------------------------------- pod: - - opnfv-jump-2: - installer: fuel + - opnfv-jump-1: + installer: apex <<: *brahmaputra - intel-pod5: installer: joid <<: *brahmaputra + - orange-pod2: + installer: joid + <<: *brahmaputra - huawei-us-deploy-bare-1: installer: compass <<: *brahmaputra - ericsson-pod1: installer: fuel <<: *brahmaputra + - ericsson-pod2: + installer: fuel + <<: *brahmaputra + - opnfv-jump-2: + installer: fuel + <<: *brahmaputra - virtual: installer: fuel <<: *brahmaputra @@ -47,6 +58,9 @@ #-------------------------------- # master #-------------------------------- + - opnfv-jump-2: + installer: fuel + <<: *master - intel-pod6: installer: joid <<: *master @@ -59,9 +73,6 @@ - ericsson-pod1: installer: fuel <<: *master - - ericsson-pod2: - installer: fuel - <<: *master - orange-test1: installer: fuel <<: *master @@ -92,9 +103,19 @@ - job-template: name: 'functest-{installer}-{pod}-{testsuite}-{stream}' + concurrent: true + + properties: + - throttle: + enabled: true + max-per-node: 1 + wrappers: - build-name: name: '$BUILD_NUMBER Suite: $FUNCTEST_SUITE_NAME Scenario: $DEPLOY_SCENARIO' + - timeout: + timeout: 400 + abort: true parameters: - project-parameter: @@ -105,6 +126,10 @@ - string: name: DEPLOY_SCENARIO default: 'os-odl_l2-nofeature-ha' + - string: + name: DOCKER_TAG + default: '{docker-tag}' + description: 'Tag to pull docker image' - functest-parameter: gs-pathname: '{gs-pathname}' @@ -205,7 +230,6 @@ if [ "${PUSH_RESULTS_TO_DB}" == "true" ]; then flag="-r" fi - echo "Functest: running all the tests" 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 @@ -237,19 +261,19 @@ envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ -e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \ -e CI_DEBUG=${CI_DEBUG}" - - dir_result="${HOME}/opnfv/functest/reports" + branch=${GIT_BRANCH##*/} + dir_result="${HOME}/opnfv/functest/results/${branch}" mkdir -p ${dir_result} sudo rm -rf ${dir_result}/* res_volume="-v ${dir_result}:/home/opnfv/functest/results" - docker pull opnfv/functest:latest_stable >$redirect - cmd="sudo docker run --privileged=true -id ${envs} ${labconfig} ${sshkey} ${res_volume} opnfv/functest:latest_stable /bin/bash" + docker pull opnfv/functest:$DOCKER_TAG >$redirect + cmd="sudo docker run --privileged=true -id ${envs} ${labconfig} ${sshkey} ${res_volume} opnfv/functest:latest /bin/bash" echo "Functest: Running docker run command: ${cmd}" ${cmd} docker ps -a sleep 5 - container_id=$(docker ps | grep 'opnfv/functest:latest_stable' | awk '{print $1}' | head -1) + container_id=$(docker ps | grep 'opnfv/functest:latest' | awk '{print $1}' | head -1) echo "Container ID=${container_id}" if [ -z ${container_id} ]; then echo "Cannot find opnfv/functest container ID ${container_id}. Please check if it is existing." @@ -260,7 +284,7 @@ docker start ${container_id} sleep 5 docker ps - if [ $(docker ps | grep 'opnfv/functest:latest_stable' | wc -l) == 0 ]; then + if [ $(docker ps | grep 'opnfv/functest:latest' | wc -l) == 0 ]; then echo "The container opnfv/functest with ID=${container_id} has not been properly started. Exiting..." exit 1 fi @@ -272,7 +296,7 @@ name: functest-store-results builders: - shell: - !include-raw: res-build.sh + !include-raw: ../../utils/push-test-logs.sh - builder: name: functest-cleanup diff --git a/jjb/functest/res-build.sh b/jjb/functest/res-build.sh deleted file mode 100644 index 1f4699681..000000000 --- a/jjb/functest/res-build.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -set -e -set -o pipefail - -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 jumphost -# to be used only with CI -dir_result="${HOME}/opnfv/functest/results" - -# Clean the results directory -# remove json file for rally, export only html -# json should have been pushed into the DB -rm -f $dir_result/rally/*.json - -# Several information are required: date and testbed -# date is generated by functest so on the artifact, the results shall be under functest/<testbed id>/date/ -testbed=$NODE_NAME - -project_artifact=logs/functest/$testbed/$res_build_date - -# copy folder to artifact -if [ -d "$dir_result" ]; then - if [ "$(ls -A $dir_result)" ]; then - echo "copy result files to artifact $project_artifact" - gsutil -m cp -r "$dir_result" gs://artifacts.opnfv.org/"$project_artifact"/ - - # delete local results - # should not be useful as the container is about to die...just in case - rm -Rf /home/opnfv/functest/results/* - else - echo "Result folder is empty" - fi -else - echo "No result folder found" -fi |