From: mei mei Date: Fri, 26 May 2017 09:25:58 +0000 (+0000) Subject: Merge "Add auto-report to MongoDB" X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=c3fdf0d9afb9b6bc236ac716428afeeea2c6ae47;hp=dcc6f4c792f88578a248d417d5d78b5603d826f7;p=releng.git Merge "Add auto-report to MongoDB" --- diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh index d6bb48555..74f67ce5f 100755 --- a/jjb/apex/apex-deploy.sh +++ b/jjb/apex/apex-deploy.sh @@ -128,7 +128,7 @@ if [[ "$JOB_NAME" =~ "virtual" ]]; then if [[ "$JOB_NAME" == *csit* ]]; then DEPLOY_CMD="${DEPLOY_CMD} -e csit-environment.yaml" fi - if [[ "$JOB_NAME" == *promote* ]]; then + if [[ "$PROMOTE" == "True" ]]; then DEPLOY_CMD="${DEPLOY_CMD} --virtual-computes 2" fi else diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index ae2186002..87aa763f1 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -209,23 +209,23 @@ kill-phase-on: FAILURE abort-all-job: true git-revision: true - - multijob: - name: functest-smoke - condition: SUCCESSFUL - projects: - - name: 'functest-apex-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO={verify-scenario} - FUNCTEST_SUITE_NAME=healthcheck - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false +# - multijob: +# name: functest-smoke +# condition: SUCCESSFUL +# projects: +# - name: 'functest-apex-virtual-suite-{stream}' +# current-parameters: false +# predefined-parameters: | +# DEPLOY_SCENARIO={verify-scenario} +# FUNCTEST_SUITE_NAME=healthcheck +# GERRIT_BRANCH=$GERRIT_BRANCH +# GERRIT_REFSPEC=$GERRIT_REFSPEC +# GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER +# GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE +# node-parameters: true +# kill-phase-on: FAILURE +# abort-all-job: true +# git-revision: false # Verify Scenario Gate - job-template: @@ -310,23 +310,23 @@ kill-phase-on: FAILURE abort-all-job: true git-revision: true - - multijob: - name: functest-smoke - condition: SUCCESSFUL - projects: - - name: 'functest-apex-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO={verify-scenario} - FUNCTEST_SUITE_NAME=healthcheck - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false +# - multijob: +# name: functest-smoke +# condition: SUCCESSFUL +# projects: +# - name: 'functest-apex-virtual-suite-{stream}' +# current-parameters: false +# predefined-parameters: | +# DEPLOY_SCENARIO={verify-scenario} +# FUNCTEST_SUITE_NAME=healthcheck +# GERRIT_BRANCH=$GERRIT_BRANCH +# GERRIT_REFSPEC=$GERRIT_REFSPEC +# GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER +# GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE +# node-parameters: true +# kill-phase-on: FAILURE +# abort-all-job: true +# git-revision: false - job-template: name: 'apex-runner-cperf-{stream}' @@ -374,16 +374,18 @@ node-parameters: false current-parameters: true predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= OPNFV_CLEAN=yes DEPLOY_SCENARIO={verify-scenario} kill-phase-on: FAILURE abort-all-job: true git-revision: false - multijob: - name: Functest - condition: ALWAYS + name: CPERF + condition: SUCCESSFUL projects: - - name: 'functest-apex-baremetal-daily-{stream}' + - name: 'cperf-apex-intel-pod2-daily-master' node-parameters: true current-parameters: false predefined-parameters: @@ -420,7 +422,7 @@ wrappers: - timeout: - timeout: 90 + timeout: 150 fail: true properties: @@ -1164,6 +1166,7 @@ GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + PROMOTE=True node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -1268,6 +1271,7 @@ GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + PROMOTE=True node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -1327,6 +1331,10 @@ name: GS_URL default: $GS_BASE{gs-pathname} description: "URL to Google Storage." + - string: + name: PROMOTE + default: 'False' + description: "Flag to know if we should promote/upload snapshot artifacts." ######################## # builder macros diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2 index 3f10e214b..3bebf85a1 100644 --- a/jjb/apex/apex.yml.j2 +++ b/jjb/apex/apex.yml.j2 @@ -209,23 +209,23 @@ kill-phase-on: FAILURE abort-all-job: true git-revision: true - - multijob: - name: functest-smoke - condition: SUCCESSFUL - projects: - - name: 'functest-apex-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO={verify-scenario} - FUNCTEST_SUITE_NAME=healthcheck - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false +# - multijob: +# name: functest-smoke +# condition: SUCCESSFUL +# projects: +# - name: 'functest-apex-virtual-suite-{stream}' +# current-parameters: false +# predefined-parameters: | +# DEPLOY_SCENARIO={verify-scenario} +# FUNCTEST_SUITE_NAME=healthcheck +# GERRIT_BRANCH=$GERRIT_BRANCH +# GERRIT_REFSPEC=$GERRIT_REFSPEC +# GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER +# GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE +# node-parameters: true +# kill-phase-on: FAILURE +# abort-all-job: true +# git-revision: false # Verify Scenario Gate - job-template: @@ -310,23 +310,23 @@ kill-phase-on: FAILURE abort-all-job: true git-revision: true - - multijob: - name: functest-smoke - condition: SUCCESSFUL - projects: - - name: 'functest-apex-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO={verify-scenario} - FUNCTEST_SUITE_NAME=healthcheck - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false +# - multijob: +# name: functest-smoke +# condition: SUCCESSFUL +# projects: +# - name: 'functest-apex-virtual-suite-{stream}' +# current-parameters: false +# predefined-parameters: | +# DEPLOY_SCENARIO={verify-scenario} +# FUNCTEST_SUITE_NAME=healthcheck +# GERRIT_BRANCH=$GERRIT_BRANCH +# GERRIT_REFSPEC=$GERRIT_REFSPEC +# GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER +# GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE +# node-parameters: true +# kill-phase-on: FAILURE +# abort-all-job: true +# git-revision: false - job-template: name: 'apex-runner-cperf-{stream}' @@ -374,16 +374,18 @@ node-parameters: false current-parameters: true predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= OPNFV_CLEAN=yes DEPLOY_SCENARIO={verify-scenario} kill-phase-on: FAILURE abort-all-job: true git-revision: false - multijob: - name: Functest - condition: ALWAYS + name: CPERF + condition: SUCCESSFUL projects: - - name: 'functest-apex-baremetal-daily-{stream}' + - name: 'cperf-apex-intel-pod2-daily-master' node-parameters: true current-parameters: false predefined-parameters: @@ -420,7 +422,7 @@ wrappers: - timeout: - timeout: 90 + timeout: 150 fail: true properties: @@ -803,6 +805,7 @@ GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + PROMOTE=True node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -907,6 +910,7 @@ GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + PROMOTE=True node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -966,6 +970,10 @@ name: GS_URL default: $GS_BASE{gs-pathname} description: "URL to Google Storage." + - string: + name: PROMOTE + default: 'False' + description: "Flag to know if we should promote/upload snapshot artifacts." ######################## # builder macros diff --git a/jjb/daisy4nfv/daisy-project-jobs.yml b/jjb/daisy4nfv/daisy-project-jobs.yml index e631ee9b9..0a9d43d25 100644 --- a/jjb/daisy4nfv/daisy-project-jobs.yml +++ b/jjb/daisy4nfv/daisy-project-jobs.yml @@ -71,7 +71,7 @@ project: '{project}' branch: '{branch}' - 'opnfv-build-centos-defaults' - - 'daisy-defaults' + - '{installer}-defaults' - '{installer}-project-parameter': gs-pathname: '{gs-pathname}' @@ -157,7 +157,8 @@ - project-parameter: project: '{project}' branch: '{branch}' - - 'daisy-defaults' + - '{installer}-defaults' + - '{slave-label}-defaults' - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT @@ -165,8 +166,6 @@ - string: name: DEPLOY_SCENARIO default: 'os-nosdn-nofeature-ha' - - 'daisy-defaults' - - '{slave-label}-defaults' - '{installer}-project-parameter': gs-pathname: '{gs-pathname}' diff --git a/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml index 9e7b867af..561ffbe24 100644 --- a/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml +++ b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml @@ -54,6 +54,11 @@ enabled: true max-total: 4 option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '{alias}-merge-(master|danube)' + block-level: 'NODE' scm: - git-scm @@ -148,7 +153,7 @@ - build-blocker: use-build-blocker: true blocking-jobs: - - '{alias}-merge-(master|danube)' + - '{alias}-merge-{phase}-.*' block-level: 'NODE' scm: @@ -164,6 +169,7 @@ - project-parameter: project: '{project}' branch: '{branch}' + - '{installer}-defaults' - '{slave-label}-defaults' - '{alias}-merge-defaults': gs-pathname: '{gs-pathname}' diff --git a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml index 6335c33a2..dff0ff0a4 100644 --- a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml +++ b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml @@ -47,6 +47,12 @@ enabled: true max-total: 4 option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '{installer}-merge-build-.*' + block-level: 'NODE' + scm: - git-scm-gerrit wrappers: @@ -138,6 +144,13 @@ enabled: true max-total: 6 option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '{installer}-merge-build-.*' + - '{alias}-verify-build-.*' + block-level: 'NODE' + scm: - git-scm-gerrit wrappers: @@ -149,9 +162,11 @@ - project-parameter: project: '{project}' branch: '{branch}' + - '{installer}-defaults' - '{slave-label}-defaults' - '{alias}-verify-defaults': gs-pathname: '{gs-pathname}' + builders: - description-setter: description: "Built on $NODE_NAME" diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index 3ad67b60d..f323a8ab5 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -6,9 +6,19 @@ set -e [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" +DOVETAIL_HOME=/home/opnfv/cvp +if [ -d ${DOVETAIL_HOME} ]; then + sudo rm -rf ${DOVETAIL_HOME}/* +else + sudo mkdir -p ${DOVETAIL_HOME} +fi + +DOVETAIL_CONFIG=${DOVETAIL_HOME}/pre_config +sudo mkdir -p ${DOVETAIL_CONFIG} + sshkey="" # The path of openrc.sh is defined in fetch_os_creds.sh -OPENRC=$WORKSPACE/opnfv-openrc.sh +OPENRC=${DOVETAIL_CONFIG}/env_config.sh if [[ ${INSTALLER_TYPE} == 'apex' ]]; then instack_mac=$(sudo virsh domiflist undercloud | grep default | \ grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") @@ -37,7 +47,7 @@ releng_repo=${WORKSPACE}/releng git clone https://gerrit.opnfv.org/gerrit/releng ${releng_repo} >/dev/null if [[ ${INSTALLER_TYPE} != 'joid' ]]; then - ${releng_repo}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} >${redirect} + sudo /bin/bash ${releng_repo}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} >${redirect} fi if [[ -f $OPENRC ]]; then @@ -65,13 +75,8 @@ else echo "HA test cases may not run properly." fi -pod_file_dir="/home/opnfv/dovetail/userconfig" -if [ -d ${pod_file_dir} ]; then - sudo rm -rf ${pod_file_dir}/* -else - sudo mkdir -p ${pod_file_dir} -fi -cmd="sudo python ${releng_repo}/utils/create_pod_file.py -t ${INSTALLER_TYPE} -i ${INSTALLER_IP} ${options} -f ${pod_file_dir}/pod.yaml" +cmd="sudo python ${releng_repo}/utils/create_pod_file.py -t ${INSTALLER_TYPE} \ + -i ${INSTALLER_IP} ${options} -f ${DOVETAIL_CONFIG}/pod.yaml" echo ${cmd} ${cmd} @@ -79,11 +84,11 @@ deactivate cd ${WORKSPACE} -if [ -f ${pod_file_dir}/pod.yaml ]; then - echo "file ${pod_file_dir}/pod.yaml:" - cat ${pod_file_dir}/pod.yaml +if [ -f ${DOVETAIL_CONFIG}/pod.yaml ]; then + echo "file ${DOVETAIL_CONFIG}/pod.yaml:" + cat ${DOVETAIL_CONFIG}/pod.yaml else - echo "Error: There doesn't exist file ${pod_file_dir}/pod.yaml." + echo "Error: There doesn't exist file ${DOVETAIL_CONFIG}/pod.yaml." echo "HA test cases may not run properly." fi @@ -91,20 +96,19 @@ ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" if [ "$INSTALLER_TYPE" == "fuel" ]; then echo "Fetching id_rsa file from jump_server $INSTALLER_IP..." - sshpass -p r00tme sudo scp $ssh_options root@${INSTALLER_IP}:~/.ssh/id_rsa ${pod_file_dir}/id_rsa + sshpass -p r00tme sudo scp $ssh_options root@${INSTALLER_IP}:~/.ssh/id_rsa ${DOVETAIL_CONFIG}/id_rsa fi opts="--privileged=true -id" -results_envs="-v /var/run/docker.sock:/var/run/docker.sock \ - -v /home/opnfv/dovetail/results:/home/opnfv/dovetail/results" -openrc_volume="-v ${OPENRC}:${OPENRC}" -userconfig_volume="-v ${pod_file_dir}:${pod_file_dir}" + +docker_volume="-v /var/run/docker.sock:/var/run/docker.sock" +dovetail_home_volume="-v ${DOVETAIL_HOME}:${DOVETAIL_HOME}" # Pull the image with correct tag echo "Dovetail: Pulling image opnfv/dovetail:${DOCKER_TAG}" docker pull opnfv/dovetail:$DOCKER_TAG >$redirect -cmd="docker run ${opts} ${results_envs} ${openrc_volume} ${userconfig_volume} \ +cmd="docker run ${opts} -e ${DOVETAIL_HOME} ${docker_volume} ${dovetail_home_volume} \ ${sshkey} opnfv/dovetail:${DOCKER_TAG} /bin/bash" echo "Dovetail: running docker run command: ${cmd}" ${cmd} >${redirect} @@ -126,13 +130,13 @@ if [ $(docker ps | grep "opnfv/dovetail:${DOCKER_TAG}" | wc -l) == 0 ]; then fi list_cmd="dovetail list ${TESTSUITE}" -run_cmd="dovetail run --openrc ${OPENRC} --testsuite ${TESTSUITE} -d" +run_cmd="dovetail run --testsuite ${TESTSUITE} -d" echo "Container exec command: ${list_cmd}" docker exec $container_id ${list_cmd} echo "Container exec command: ${run_cmd}" docker exec $container_id ${run_cmd} -sudo cp -r ${DOVETAIL_REPO_DIR}/results ./ +sudo cp -r ${DOVETAIL_HOME}/results ./ # To make sure the file owner is the current user, for the copied results files in the above line # if not, there will be error when next time to wipe workspace # CURRENT_USER=${SUDO_USER:-$USER} diff --git a/jjb/global/installer-params.yml b/jjb/global/installer-params.yml index fc9f34a48..40fc42c76 100644 --- a/jjb/global/installer-params.yml +++ b/jjb/global/installer-params.yml @@ -95,12 +95,16 @@ parameters: - string: name: INSTALLER_IP - default: '10.20.0.2' + default: '10.20.7.3' description: 'IP of the installer' - string: name: INSTALLER_TYPE default: daisy description: 'Installer used for deploying OPNFV on this POD' + - string: + name: BRIDGE + default: 'br7' + description: 'pxe bridge for booting of Fuel master' - parameter: name: 'infra-defaults' diff --git a/jjb/global/slave-params.yml b/jjb/global/slave-params.yml index 44666a7d1..cdc08eaf4 100644 --- a/jjb/global/slave-params.yml +++ b/jjb/global/slave-params.yml @@ -204,6 +204,10 @@ - label: name: SLAVE_LABEL default: 'daisy-baremetal' + - string: + name: INSTALLER_IP + default: '10.20.11.2' + description: 'IP of the installer' - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT @@ -283,6 +287,14 @@ - label: name: SLAVE_LABEL default: 'daisy-virtual' + - string: + name: INSTALLER_IP + default: '10.20.11.2' + description: 'IP of the installer' + - string: + name: BRIDGE + default: 'daisy1' + description: 'pxe bridge for booting of Fuel master' - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT @@ -593,7 +605,7 @@ description: 'Git URL to use on this Jenkins Slave' - string: name: INSTALLER_IP - default: '10.20.7.2' + default: '10.20.7.3' description: 'IP of the installer' - string: name: BRIDGE