From: Serena Feng Date: Fri, 13 Apr 2018 06:15:27 +0000 (+0000) Subject: Merge "bugfix: run doctor tests parallelly" X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=859c955553ac60a7fcd1af12e72031db20bbaf6a;hp=17617f1c0a78c7bdad0d11d329a6c7e119cbbddd;p=releng.git Merge "bugfix: run doctor tests parallelly" --- diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh index 94d464259..958e4bf5e 100755 --- a/jjb/apex/apex-deploy.sh +++ b/jjb/apex/apex-deploy.sh @@ -13,21 +13,8 @@ echo if [ -z "$DEPLOY_SCENARIO" ]; then echo "Deploy scenario not set!" exit 1 -elif [[ "$DEPLOY_SCENARIO" == *gate* ]]; then - echo "Detecting Gating scenario..." - if [ -z "$GERRIT_EVENT_COMMENT_TEXT" ]; then - echo "ERROR: Gate job triggered without comment!" - exit 1 - else - DEPLOY_SCENARIO=$(echo ${GERRIT_EVENT_COMMENT_TEXT} | grep start-gate-scenario | grep -Eo 'os-.*$') - if [ -z "$DEPLOY_SCENARIO" ]; then - echo "ERROR: Unable to detect scenario in Gerrit Comment!" - echo "Format of comment to trigger gate should be 'start-gate-scenario: '" - exit 1 - else - echo "Gate scenario detected: ${DEPLOY_SCENARIO}" - fi - fi +else + echo "Deploy scenario: ${DEPLOY_SCENARIO}" fi # Dev or RPM/ISO build @@ -143,8 +130,6 @@ fi if [ "$IPV6_FLAG" == "True" ]; then NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings_v6.yaml" -elif echo ${DEPLOY_SCENARIO} | grep fdio; then - NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings_vpp.yaml" else NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings.yaml" fi diff --git a/jjb/apex/apex-download-artifact.sh b/jjb/apex/apex-download-artifact.sh index 066d61203..6c0f8fe26 100755 --- a/jjb/apex/apex-download-artifact.sh +++ b/jjb/apex/apex-download-artifact.sh @@ -13,21 +13,8 @@ echo if [ -z "$DEPLOY_SCENARIO" ]; then echo "Deploy scenario not set!" exit 1 -elif [[ "$DEPLOY_SCENARIO" == *gate* ]]; then - echo "Detecting Gating scenario..." - if [ -z "$GERRIT_EVENT_COMMENT_TEXT" ]; then - echo "ERROR: Gate job triggered without comment!" - exit 1 - else - DEPLOY_SCENARIO=$(echo ${GERRIT_EVENT_COMMENT_TEXT} | grep start-gate-scenario | grep -Eo 'os-.*$') - if [ -z "$DEPLOY_SCENARIO" ]; then - echo "ERROR: Unable to detect scenario in Gerrit Comment!" - echo "Format of comment to trigger gate should be 'start-gate-scenario: '" - exit 1 - else - echo "Gate scenario detected: ${DEPLOY_SCENARIO}" - fi - fi +else + echo "Deploy scenario: ${DEPLOY_SCENARIO}" fi # if upstream we do not need to download anything diff --git a/jjb/apex/apex-verify-jobs.yml b/jjb/apex/apex-verify-jobs.yml index 79b358815..318fc9686 100644 --- a/jjb/apex/apex-verify-jobs.yml +++ b/jjb/apex/apex-verify-jobs.yml @@ -315,6 +315,12 @@ option: 'project' builders: + # yamllint disable rule:line-length + - shell: | + echo DEPLOY_SCENARIO=$(echo $GERRIT_EVENT_COMMENT_TEXT | grep start-gate-scenario | grep -Eo 'os|k8s-.*$' + # yamllint enable rule:line-length + - inject: + properties-file: detected_scenario - multijob: name: deploy-virtual condition: SUCCESSFUL @@ -323,7 +329,7 @@ current-parameters: false predefined-parameters: | ARTIFACT_VERSION=$ARTIFACT_VERSION - DEPLOY_SCENARIO=gate + DEPLOY_SCENARIO=$DEPLOY_SCENARIO OPNFV_CLEAN=yes GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC @@ -334,12 +340,6 @@ kill-phase-on: FAILURE abort-all-job: true git-revision: true - # yamllint disable rule:line-length - - shell: | - echo DEPLOY_SCENARIO=$(echo $GERRIT_EVENT_COMMENT_TEXT | grep start-gate-scenario | grep -Eo 'os-.*') > detected_scenario - # yamllint enable rule:line-length - - inject: - properties-file: detected_scenario - multijob: name: functest-smoke condition: ALWAYS diff --git a/jjb/barometer/barometer.yml b/jjb/barometer/barometer.yml index a8d314a75..92176207f 100644 --- a/jjb/barometer/barometer.yml +++ b/jjb/barometer/barometer.yml @@ -22,10 +22,6 @@ branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - job-template: name: 'barometer-verify-{stream}' diff --git a/jjb/bottlenecks/bottlenecks-project-jobs.yml b/jjb/bottlenecks/bottlenecks-project-jobs.yml index bebac995b..d4930d745 100644 --- a/jjb/bottlenecks/bottlenecks-project-jobs.yml +++ b/jjb/bottlenecks/bottlenecks-project-jobs.yml @@ -26,11 +26,6 @@ gs-pathname: '/{stream}' gs-packagepath: '/{stream}/{suite}' disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - gs-packagepath: '/{stream}/{suite}' - disabled: false suite: - 'posca_stress_traffic' diff --git a/jjb/calipso/calipso.yml b/jjb/calipso/calipso.yml index b855752c2..6701e7ca2 100644 --- a/jjb/calipso/calipso.yml +++ b/jjb/calipso/calipso.yml @@ -15,9 +15,6 @@ branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false - - euphrates: - branch: 'stable/{stream}' - disabled: false - job-template: name: 'calipso-verify-{stream}' diff --git a/jjb/container4nfv/container4nfv-project.yml b/jjb/container4nfv/container4nfv-project.yml index 4bd2a80a2..194a1a989 100644 --- a/jjb/container4nfv/container4nfv-project.yml +++ b/jjb/container4nfv/container4nfv-project.yml @@ -22,10 +22,6 @@ branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - job-template: name: 'container4nfv-verify-{stream}' diff --git a/jjb/daisy4nfv/daisy-daily-jobs.yml b/jjb/daisy4nfv/daisy-daily-jobs.yml index 2eb27a663..4eaa39ae9 100644 --- a/jjb/daisy4nfv/daisy-daily-jobs.yml +++ b/jjb/daisy4nfv/daisy-daily-jobs.yml @@ -121,6 +121,7 @@ - 'testapi-parameter' - 'daisy-project-parameter': gs-pathname: '{gs-pathname}' + - 'deploy-scenario' builders: - description-setter: @@ -155,9 +156,6 @@ - condition-kind: regex-match regex: 'baremetal' label: '{pod}' - - condition-kind: regex-match - regex: 'master' - label: '{stream}' steps: - trigger-builds: - project: 'yardstick-daisy-{pod}-daily-{stream}' @@ -207,6 +205,7 @@ - 'testapi-parameter' - 'daisy-project-parameter': gs-pathname: '{gs-pathname}' + - 'deploy-scenario' - string: name: DEPLOY_TIMEOUT default: '150' @@ -240,7 +239,7 @@ - trigger: name: 'daisy-os-nosdn-nofeature-ha-baremetal-daily-master-trigger' triggers: - - timed: '0 12 * * *' + - timed: '' # Basic NOHA Scenarios - trigger: name: 'daisy-os-nosdn-nofeature-noha-baremetal-daily-master-trigger' @@ -250,7 +249,7 @@ - trigger: name: 'daisy-os-odl-nofeature-ha-baremetal-daily-master-trigger' triggers: - - timed: '0 18 * * *' + - timed: '' # ovs_dpdk Scenarios - trigger: name: 'daisy-os-nosdn-ovs_dpdk-noha-baremetal-daily-master-trigger' @@ -288,7 +287,7 @@ - trigger: name: 'daisy-os-nosdn-nofeature-ha-baremetal-daily-fraser-trigger' triggers: - - timed: '0 0 * * *' + - timed: '0 0,6 * * *' # Basic NOHA Scenarios - trigger: name: 'daisy-os-nosdn-nofeature-noha-baremetal-daily-fraser-trigger' @@ -298,7 +297,7 @@ - trigger: name: 'daisy-os-odl-nofeature-ha-baremetal-daily-fraser-trigger' triggers: - - timed: '0 20 * * *' + - timed: '0 12,18 * * *' # ovs_dpdk Scenarios - trigger: name: 'daisy-os-nosdn-ovs_dpdk-noha-baremetal-daily-fraser-trigger' diff --git a/jjb/doctor/doctor.yml b/jjb/doctor/doctor.yml index 7a82b5d49..5732100be 100644 --- a/jjb/doctor/doctor.yml +++ b/jjb/doctor/doctor.yml @@ -16,10 +16,15 @@ docker-tag: 'stable' disabled: false + # feature projects' tests are not triggered by functest + # doctor verify Pods need to deploy with these scenario installer: - - 'apex' - - 'fuel' - - 'daisy' + - 'apex': + scenario: 'os-nosdn-kvm-ha' + - 'fuel': + scenario: 'os-nosdn-ovs-ha' + - 'daisy': + scenario: 'os-nosdn-ovs_dpdk-noha' arch: - 'x86_64' @@ -146,7 +151,7 @@ description: 'Remove downloaded docker images (opnfv/functest:*)' - string: name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-ha' + default: '{scenario}' description: 'Scenario to deploy and test' - parameter: diff --git a/jjb/domino/domino.yml b/jjb/domino/domino.yml index 7fc818c7a..e91260463 100644 --- a/jjb/domino/domino.yml +++ b/jjb/domino/domino.yml @@ -12,10 +12,6 @@ branch: '{stream}' gs-pathname: '' disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - job-template: name: 'domino-verify-{stream}' diff --git a/jjb/functest/functest-alpine.sh b/jjb/functest/functest-alpine.sh index 72b94bd18..440b00af9 100755 --- a/jjb/functest/functest-alpine.sh +++ b/jjb/functest/functest-alpine.sh @@ -28,13 +28,8 @@ check_os_deployment() { run_tiers() { tiers=$1 - if [[ ${BRANCH##*/} == "stable/euphrates" ]]; then - cmd_opt="prepare_env start && run_tests -r -t all" - [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="prepare_env start && run_tests -t all" - else - cmd_opt="run_tests -r -t all" - [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="run_tests -t all" - fi + cmd_opt="run_tests -r -t all" + [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="run_tests -t all" ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" echo 0 > ${ret_val_file} @@ -58,11 +53,7 @@ run_tiers() { run_test() { test_name=$1 - if [[ ${BRANCH##*/} == "stable/euphrates" ]]; then - cmd_opt="prepare_env start && run_tests -t ${test_name}" - else - cmd_opt="run_tests -t ${test_name}" - fi + cmd_opt="run_tests -t ${test_name}" ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" echo 0 > ${ret_val_file} # Determine which Functest image should be used for the test case @@ -115,11 +106,7 @@ elif [[ ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_TYPE} == 'baremetal' ]]; then cacert_file_vol="-v ${HOME}/os_cacert:/etc/ssl/certs/mcp_os_cacert" fi -if [[ ${BRANCH} == "stable/euphrates" ]]; then - rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/openstack.creds" -else - rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/env_file" -fi +rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/env_file" # Set iptables rule to allow forwarding return traffic for container if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FORWARD | awk 'NR==3' | grep RETURN 2> ${redirect}; then diff --git a/jjb/functest/functest-kubernetes-project-jobs.yml b/jjb/functest/functest-kubernetes-project-jobs.yml index 55999060a..7f8dd8d53 100644 --- a/jjb/functest/functest-kubernetes-project-jobs.yml +++ b/jjb/functest/functest-kubernetes-project-jobs.yml @@ -18,11 +18,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - fraser: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - - euphrates: + - fraser: &fraser branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false diff --git a/jjb/functest/functest-project-jobs.yml b/jjb/functest/functest-project-jobs.yml index 3adf8808c..4468da778 100644 --- a/jjb/functest/functest-project-jobs.yml +++ b/jjb/functest/functest-project-jobs.yml @@ -18,7 +18,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - fraser: + - fraser: &fraser branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false diff --git a/jjb/functest/xtesting-docker.yml b/jjb/functest/xtesting-docker.yml index dc26344e3..251c3954e 100644 --- a/jjb/functest/xtesting-docker.yml +++ b/jjb/functest/xtesting-docker.yml @@ -12,6 +12,9 @@ - master: branch: '{stream}' disabled: false + - fraser: + branch: 'stable/{stream}' + disabled: false arch_tag: - 'amd64': diff --git a/jjb/functest/xtesting-project-jobs.yml b/jjb/functest/xtesting-project-jobs.yml index bf08775b6..e109387c6 100644 --- a/jjb/functest/xtesting-project-jobs.yml +++ b/jjb/functest/xtesting-project-jobs.yml @@ -18,7 +18,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - euphrates: + - fraser: &fraser branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false diff --git a/jjb/global/installer-params.yml b/jjb/global/installer-params.yml index 683ef78ba..f663c4556 100644 --- a/jjb/global/installer-params.yml +++ b/jjb/global/installer-params.yml @@ -146,3 +146,11 @@ name: EXTERNAL_NETWORK default: 'external' description: 'external network for test' + +- parameter: + name: 'deploy-scenario' + parameters: + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-ha' + description: "OPNFV deployment scenario" diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index 205802fab..d70e7e0a5 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -40,6 +40,34 @@ default: 'refs/heads/{branch}' description: "Default refspec needed for manually triggering." +## +# Reporting Deployment Results +# +# To report deployment results to +# http://testresults.opnfv.org/test/#/deployresults, add the following +# parameters, builders, and publishers to a deployment job: +# +# parameters: +# - testapi-parameter +# +# builders: +# - track-begin-timestamp +# +# publishers: +# - report-provision-result +# +# Note: The following string parameter must also exist, as they are used +# when reporting the provision result: +# +# * INSTALLER +# * INSTALLER_VERSION +# * DEPLOY_SCENARIO +# +# most installers include these but you should verify first before +# adding the publisher, otherwise the deployment build may be marked +# unstable. +# +## - parameter: name: testapi-parameter parameters: @@ -47,10 +75,6 @@ name: TESTAPI_URL default: 'http://testresults.opnfv.org/test/api/v1' description: "Default TestAPI URL, currently using v1" - - string: - name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-ha' - description: "OPNFV deployment scenario" - string: name: INSTALLER_VERSION default: 'master' diff --git a/jjb/ovn4nfv/ovn4nfv-project-jobs.yml b/jjb/ovn4nfv/ovn4nfv-project-jobs.yml index 0316ff70e..2ce4b6df9 100644 --- a/jjb/ovn4nfv/ovn4nfv-project-jobs.yml +++ b/jjb/ovn4nfv/ovn4nfv-project-jobs.yml @@ -13,10 +13,6 @@ branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false jobs: - 'ovn4nfv-build-{stream}' diff --git a/jjb/sfc/sfc-project-jobs.yml b/jjb/sfc/sfc-project-jobs.yml index 1fb4d990a..fea792467 100644 --- a/jjb/sfc/sfc-project-jobs.yml +++ b/jjb/sfc/sfc-project-jobs.yml @@ -20,10 +20,6 @@ branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - job-template: name: 'sfc-verify-{stream}' diff --git a/jjb/vswitchperf/vswitchperf.yml b/jjb/vswitchperf/vswitchperf.yml index 01a154aec..ba0742f3b 100644 --- a/jjb/vswitchperf/vswitchperf.yml +++ b/jjb/vswitchperf/vswitchperf.yml @@ -19,10 +19,6 @@ branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - job-template: diff --git a/jjb/xci/xci-run-functest.sh b/jjb/xci/xci-run-functest.sh index 7fb0be9b9..6d43c9789 100755 --- a/jjb/xci/xci-run-functest.sh +++ b/jjb/xci/xci-run-functest.sh @@ -47,13 +47,27 @@ fi export XCI_PATH=/home/devuser/releng-xci export XCI_VENV=${XCI_PATH}/venv -ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "source $XCI_VENV/bin/activate; source ${XCI_PATH}/.cache/xci.env && cd releng-xci/xci && ansible-playbook -i installer/osa/files/$XCI_FLAVOR/inventory playbooks/prepare-functest.yml" +ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "source $XCI_VENV/bin/activate; while read var; do declare -x \"\${var}\" 2>/dev/null; done < ${XCI_PATH}/.cache/xci.env && cd releng-xci/xci && ansible-playbook -i installer/osa/files/$XCI_FLAVOR/inventory playbooks/prepare-functest.yml" echo "Running functest" ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "/root/run-functest.sh" # Record exit code functest_exit=$? + +case ${DEPLOY_SCENARIO[0]} in + os-*) + FUNCTEST_LOG=/root/results/functest.log + ;; + k8-*) + FUNCTEST_LOG=/root/results/functest-kubernetes.log + ;; + *) + echo "Unable to determine the installer. Exiting!" + exit 1 + ;; +esac + echo "Functest log" echo "---------------------------------------------------------------------------------" -ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "cat /root/results/functest.log" +ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "cat $FUNCTEST_LOG" echo "---------------------------------------------------------------------------------" exit ${functest_exit} diff --git a/jjb/xci/xci-set-scenario.sh b/jjb/xci/xci-set-scenario.sh index 8ef525496..c28093d27 100755 --- a/jjb/xci/xci-set-scenario.sh +++ b/jjb/xci/xci-set-scenario.sh @@ -114,7 +114,7 @@ function determine_generic_scenario() { done # For all other changes, we only need to set a default scenario if it's not set already if git diff HEAD^..HEAD --name-only | grep -q -v 'xci/installer\|xci/scenario'; then - [[ ${#DEPLOY_SCENARIO[@]} -gt 0 ]] && DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature' + [[ ${#DEPLOY_SCENARIO[@]} -eq 0 ]] && DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature' fi # extract releng-xci sha diff --git a/jjb/yardstick/yardstick-daily-jobs.yml b/jjb/yardstick/yardstick-daily-jobs.yml index 2eaa0feb1..fefa8e68a 100644 --- a/jjb/yardstick/yardstick-daily-jobs.yml +++ b/jjb/yardstick/yardstick-daily-jobs.yml @@ -140,6 +140,11 @@ installer: daisy auto-trigger-name: 'daily-trigger-disabled' <<: *master + - baremetal: + slave-label: daisy-baremetal + installer: daisy + auto-trigger-name: 'daily-trigger-disabled' + <<: *fraser - virtual: slave-label: daisy-virtual installer: daisy