diff options
-rwxr-xr-x | jjb/dovetail/dovetail-run.sh | 5 | ||||
-rwxr-xr-x | jjb/fuel/fuel-deploy.sh | 30 | ||||
-rwxr-xr-x | jjb/fuel/fuel-set-scenario.sh | 54 | ||||
-rw-r--r-- | jjb/fuel/fuel-verify-jobs.yaml | 84 | ||||
-rw-r--r-- | jjb/global/releng-macros.yaml | 4 | ||||
-rw-r--r-- | jjb/openci/openci-opnfv-daily-jobs.yaml | 2 | ||||
-rw-r--r-- | jjb/opnfvdocs/docs-rtd.yaml | 2 | ||||
-rw-r--r-- | jjb/releng/releng-release-create-venv.sh | 2 | ||||
-rw-r--r-- | releases/gambia/doctor.yaml | 22 | ||||
-rw-r--r-- | releases/gambia/ipv6.yaml | 17 | ||||
-rw-r--r-- | releases/gambia/samplevnf.yaml | 9 | ||||
-rw-r--r-- | releases/gambia/yardstick.yaml | 9 |
12 files changed, 188 insertions, 52 deletions
diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index ed636b849..065d20128 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -213,6 +213,11 @@ process_info: - {testcase_name: yardstick.ha.neutron_l3_agent, attack_process: neutron-l3-agent, attack_host: cmp01} - {testcase_name: yardstick.ha.database, attack_process: mysqld, attack_host: dbs01} EOF + elif [ "$INSTALLER_TYPE" == "compass" ]; then + cat << EOF >> ${DOVETAIL_CONFIG}/pod.yaml +process_info: +- {testcase_name: yardstick.ha.rabbitmq, attack_process: rabbitmq} +EOF fi echo "file ${DOVETAIL_CONFIG}/pod.yaml:" diff --git a/jjb/fuel/fuel-deploy.sh b/jjb/fuel/fuel-deploy.sh index 9d71f0833..aa7b3bbb6 100755 --- a/jjb/fuel/fuel-deploy.sh +++ b/jjb/fuel/fuel-deploy.sh @@ -19,38 +19,34 @@ LAB_NAME=${NODE_NAME/-*} # shellcheck disable=SC2153 POD_NAME=${NODE_NAME/*-} -# Fuel requires deploy script to be ran with sudo, Armband does not -SUDO='sudo -E' -if [ "${PROJECT}" = 'fuel' ]; then - # Fuel currently supports ericsson, intel, lf and zte labs - if [[ ! "${LAB_NAME}" =~ (arm|enea|ericsson|intel|lf|unh|zte) ]]; then - echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!" - exit 1 - fi -else - SUDO= - # Armband currently supports arm, enea, unh labs - if [[ ! "${LAB_NAME}" =~ (arm|enea|unh) ]]; then - echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!" - exit 1 - fi +# Fuel currently supports arm, enea, ericsson, intel, lf, unh and zte labs +if [[ ! "${LAB_NAME}" =~ (arm|enea|ericsson|intel|lf|unh|zte) ]]; then + echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!" + exit 1 fi echo "Using configuration for ${LAB_NAME}" +# Certain labs do not require the deploy script to be ran with sudo +SUDO='sudo -E' +[[ ! "${LAB_NAME}" =~ (arm|enea|unh) ]] || SUDO= + # create TMPDIR if it doesn't exist, change permissions mkdir -p "${TMPDIR}" -chmod a+x "${HOME}" "${TMPDIR}" +sudo chmod a+x "${HOME}" "${TMPDIR}" cd "${WORKSPACE}" || exit 1 # log file name FUEL_LOG_FILENAME="${JOB_NAME}_${BUILD_NUMBER}.log.tar.gz" +# Limited scope for vPOD verify jobs running on armband-virtual +[[ ! "${JOB_NAME}" =~ verify-deploy-virtual-arm64 ]] || EXTRA_ARGS='-e' + # construct the command DEPLOY_COMMAND="${SUDO} ${WORKSPACE}/ci/deploy.sh \ -l ${LAB_NAME} -p ${POD_NAME} -s ${DEPLOY_SCENARIO} \ - -S ${TMPDIR} \ + -S ${TMPDIR} ${EXTRA_ARGS:-} \ -L ${WORKSPACE}/${FUEL_LOG_FILENAME}" # log info to console diff --git a/jjb/fuel/fuel-set-scenario.sh b/jjb/fuel/fuel-set-scenario.sh new file mode 100755 index 000000000..4c8ed7334 --- /dev/null +++ b/jjb/fuel/fuel-set-scenario.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 SUSE, Mirantis Inc., Enea Software AB and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +set -o pipefail +set -x + +#---------------------------------------------------------------------- +# This script is used by CI and executed by Jenkins jobs. +# You are not supposed to use this script manually if you don't know +# what you are doing. +#---------------------------------------------------------------------- + +# This function allows developers to specify the impacted scenario by +# requesting a RE-check via a gerrit change comment under a specific format. +# +# Patterns to be searched in change comment: +# recheck: <scenario-name> +# reverify: <scenario-name> +# Examples: +# recheck: os-odl-ovs-noha +# reverify: os-nosdn-nofeature-ha + +function set_scenario() { + # process gerrit event comment text (if present) + DEPLOY_SCENARIO=$(echo "${GERRIT_EVENT_COMMENT_TEXT}" | \ + grep -Po '(?!:(recheck|reverify):\s*)([-\w]+ha)') + if [ -z "${DEPLOY_SCENARIO}" ]; then + if [[ "$JOB_NAME" =~ baremetal ]]; then + DEPLOY_SCENARIO='os-nosdn-nofeature-ha' + else + DEPLOY_SCENARIO='os-nosdn-nofeature-noha' + fi + fi + # save the scenario names into java properties file + # so they can be injected to downstream jobs via envInject + echo "Recording the scenario '${DEPLOY_SCENARIO}' for downstream jobs" + echo "DEPLOY_SCENARIO=${DEPLOY_SCENARIO}" > "$WORK_DIRECTORY/scenario.properties" +} + +# ensure GERRIT vars are set +[ -n "${GERRIT_CHANGE_NUMBER}" ] || exit 1 +GERRIT_EVENT_COMMENT_TEXT="${GERRIT_EVENT_COMMENT_TEXT:-''}" + +# this directory is where the temporary properties file will be stored +WORK_DIRECTORY=/tmp/$GERRIT_CHANGE_NUMBER +/bin/rm -rf "$WORK_DIRECTORY" && mkdir -p "$WORK_DIRECTORY" + +set_scenario diff --git a/jjb/fuel/fuel-verify-jobs.yaml b/jjb/fuel/fuel-verify-jobs.yaml index 2a8fe3b5d..ea27d9c69 100644 --- a/jjb/fuel/fuel-verify-jobs.yaml +++ b/jjb/fuel/fuel-verify-jobs.yaml @@ -22,28 +22,34 @@ ##################################### arch_tag: - 'amd64': - slave-label: 'fuel-virtual' - functest-suite-label: 'fuel-virtual' + slave-label: 'fuel' + functest-suite-label: 'fuel' - 'arm64': - slave-label: 'armband-virtual' - functest-suite-label: 'fuel-armband-virtual' + slave-label: 'armband' + functest-suite-label: 'fuel-armband' + ##################################### + # cluster types + ##################################### + type: + - 'virtual' + - 'baremetal' ##################################### # patch verification phases ##################################### phase: - 'docker-build' - - 'deploy-virtual' + - 'deploy' ##################################### # jobs ##################################### jobs: - - 'fuel-verify-{arch_tag}-{stream}' - - 'fuel-verify-{phase}-{arch_tag}-{stream}' + - 'fuel-verify-{type}-{arch_tag}-{stream}' + - 'fuel-verify-{phase}-{type}-{arch_tag}-{stream}' ##################################### # job templates ##################################### - job-template: - name: 'fuel-verify-{arch_tag}-{stream}' + name: 'fuel-verify-{type}-{arch_tag}-{stream}' project-type: multijob @@ -60,7 +66,7 @@ - build-blocker: use-build-blocker: true blocking-jobs: - - 'fuel-os-.*?-virtual-daily-.*' + - 'fuel-os-.*?-daily-.*' - 'fuel-verify-.*' block-level: 'NODE' @@ -74,7 +80,7 @@ fail: true triggers: - - 'fuel-verify-{arch_tag}-trigger': + - 'fuel-verify-{type}-{arch_tag}-trigger': project: '{project}' branch: '{branch}' @@ -82,22 +88,22 @@ - project-parameter: project: '{project}' branch: '{branch}' - - '{slave-label}-defaults': + - '{slave-label}-{type}-defaults': installer: '{installer}' - '{installer}-defaults': gs-pathname: '{gs-pathname}' - - string: - name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-ha' builders: + - 'fuel-verify-set-scenario-macro' + - inject: + properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/scenario.properties" - description-setter: - description: "Built on $NODE_NAME" + description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME" - multijob: name: docker-build condition: SUCCESSFUL projects: - - name: 'fuel-verify-docker-build-{arch_tag}-{stream}' + - name: 'fuel-verify-docker-build-{type}-{arch_tag}-{stream}' current-parameters: false predefined-parameters: | BRANCH=$BRANCH @@ -109,13 +115,14 @@ abort-all-job: true - multijob: - name: deploy-virtual + name: deploy condition: SUCCESSFUL projects: - - name: 'fuel-verify-deploy-virtual-{arch_tag}-{stream}' + - name: 'fuel-verify-deploy-{type}-{arch_tag}-{stream}' current-parameters: false predefined-parameters: | MCP_DOCKER_TAG={arch_tag}-verify + DEPLOY_SCENARIO=$DEPLOY_SCENARIO BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER @@ -129,7 +136,7 @@ condition: SUCCESSFUL projects: # Use Functest job definition from jjb/functest/functest-daily-jobs - - name: 'functest-{functest-suite-label}-suite-{stream}' + - name: 'functest-{functest-suite-label}-{type}-suite-{stream}' current-parameters: false predefined-parameters: | FUNCTEST_MODE=tier @@ -140,11 +147,12 @@ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE node-parameters: true + enable-condition: "def m = ! ('$NODE_LABELS' =~ /armband-virtual/)" kill-phase-on: NEVER abort-all-job: true - job-template: - name: 'fuel-verify-{phase}-{arch_tag}-{stream}' + name: 'fuel-verify-{phase}-{type}-{arch_tag}-{stream}' disabled: '{obj:disabled}' @@ -177,7 +185,7 @@ - project-parameter: project: '{project}' branch: '{branch}' - - '{slave-label}-defaults': + - '{slave-label}-{type}-defaults': installer: '{installer}' - '{installer}-defaults': gs-pathname: '{gs-pathname}' @@ -190,9 +198,9 @@ # trigger macros ######################## - trigger: - name: 'fuel-verify-amd64-trigger' + name: 'fuel-verify-virtual-amd64-trigger' triggers: - - gerrit: &fuel_verify_amd64_trigger + - gerrit: &fuel_verify_virtual_amd64_trigger server-name: 'gerrit.opnfv.org' trigger-on: - patchset-created-event: @@ -201,9 +209,7 @@ exclude-no-code-change: 'false' - draft-published-event - comment-added-contains-event: - comment-contains-value: 'recheck' - - comment-added-contains-event: - comment-contains-value: 'reverify' + comment-contains-value: '(recheck|reverify)(\s|$|:\s*[-\w]+-noha)' projects: - project-compare-type: 'ANT' project-pattern: '{project}' @@ -221,10 +227,23 @@ pattern: 'docs/**' readable-message: true - trigger: - name: 'fuel-verify-arm64-trigger' + name: 'fuel-verify-virtual-arm64-trigger' triggers: - gerrit: - <<: *fuel_verify_amd64_trigger + <<: *fuel_verify_virtual_amd64_trigger +- trigger: + name: 'fuel-verify-baremetal-amd64-trigger' + triggers: + - gerrit: &fuel_verify_baremetal_amd64_trigger + <<: *fuel_verify_virtual_amd64_trigger + trigger-on: + - comment-added-contains-event: + comment-contains-value: '(recheck|reverify):\s*[-\w]+-ha' +- trigger: + name: 'fuel-verify-baremetal-arm64-trigger' + triggers: + - gerrit: + <<: *fuel_verify_baremetal_amd64_trigger skip-vote: successful: true failed: true @@ -234,7 +253,12 @@ # builder macros ##################################### - builder: - name: 'fuel-verify-deploy-virtual-macro' + name: 'fuel-verify-set-scenario-macro' + builders: + - shell: + !include-raw: ./fuel-set-scenario.sh +- builder: + name: 'fuel-verify-deploy-macro' builders: - shell: !include-raw: ./fuel-deploy.sh @@ -243,4 +267,4 @@ builders: - shell: | #!/bin/bash -ex - sudo ./ci/build.sh 'verify' '' + sudo -E ./ci/build.sh 'verify' '' diff --git a/jjb/global/releng-macros.yaml b/jjb/global/releng-macros.yaml index 8055fdbdf..fe24ed56d 100644 --- a/jjb/global/releng-macros.yaml +++ b/jjb/global/releng-macros.yaml @@ -420,7 +420,7 @@ - shell: | #!/bin/bash # Install python package - sudo pip install "flake8==2.6.2" + sudo -H pip install "flake8==2.6.2" echo "Checking python code..." for f in $(egrep '\.py$' modified_files) @@ -438,7 +438,7 @@ - shell: | #!/bin/bash # sudo Install python packages - sudo pip install "yamllint==1.8.2" + sudo -H pip install "yamllint==1.8.2" echo "Checking yaml file..." for f in $(egrep '\.ya?ml$' modified_files) diff --git a/jjb/openci/openci-opnfv-daily-jobs.yaml b/jjb/openci/openci-opnfv-daily-jobs.yaml index 7f48fcc06..ad2bce0a3 100644 --- a/jjb/openci/openci-opnfv-daily-jobs.yaml +++ b/jjb/openci/openci-opnfv-daily-jobs.yaml @@ -57,7 +57,7 @@ triggers: - jms-messaging: provider-name: openci.activemq - selector: JMSType = 'ArtifactPublishedEvent' and JMSOrigin = 'ODL' + selector: JMSType = 'ArtifactPublishedEvent' and JMSOrigin = '{origin}' builders: - shell: | diff --git a/jjb/opnfvdocs/docs-rtd.yaml b/jjb/opnfvdocs/docs-rtd.yaml index ece856903..fc99bd392 100644 --- a/jjb/opnfvdocs/docs-rtd.yaml +++ b/jjb/opnfvdocs/docs-rtd.yaml @@ -88,7 +88,7 @@ git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD fi - shell: | - sudo pip install virtualenv + sudo -H pip install virtualenv virtualenv $WORKSPACE/venv . $WORKSPACE/venv/bin/activate pip install --upgrade pip diff --git a/jjb/releng/releng-release-create-venv.sh b/jjb/releng/releng-release-create-venv.sh index 0d5635b59..de585fdb3 100644 --- a/jjb/releng/releng-release-create-venv.sh +++ b/jjb/releng/releng-release-create-venv.sh @@ -10,7 +10,7 @@ set -e -o pipefail echo "---> Create virtualenv" -sudo pip install virtualenv +sudo -H pip install virtualenv virtualenv $WORKSPACE/venv # shellcheck source=$WORKSPACE/venv/bin/activate disable=SC1091 source $WORKSPACE/venv/bin/activate diff --git a/releases/gambia/doctor.yaml b/releases/gambia/doctor.yaml new file mode 100644 index 000000000..3294fec6f --- /dev/null +++ b/releases/gambia/doctor.yaml @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 Nokia Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +project: doctor +project-type: feature +release-model: stable + +releases: + - version: opnfv-7.0.0 + location: + doctor: 3ddc2392b0ed364eede49ff006d64df3ea456350 + +branches: + - name: stable/gambia + location: + doctor: 3ddc2392b0ed364eede49ff006d64df3ea456350 diff --git a/releases/gambia/ipv6.yaml b/releases/gambia/ipv6.yaml new file mode 100644 index 000000000..a566e547c --- /dev/null +++ b/releases/gambia/ipv6.yaml @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 The Linux Foundation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +project: ipv6 +project-type: feature +release-model: stable + +branches: + - name: stable/gambia + location: + ipv6: e36f753cf6e9ab0c02a400b6bac5c79b48268d44 diff --git a/releases/gambia/samplevnf.yaml b/releases/gambia/samplevnf.yaml new file mode 100644 index 000000000..1727730bc --- /dev/null +++ b/releases/gambia/samplevnf.yaml @@ -0,0 +1,9 @@ +--- +project: samplevnf +project-type: feature +release-model: stable + +branches: + - name: stable/gambia + location: + samplevnf: 4d59d3530d1c41734f15423142e64eb9c929c717 diff --git a/releases/gambia/yardstick.yaml b/releases/gambia/yardstick.yaml new file mode 100644 index 000000000..3c782c432 --- /dev/null +++ b/releases/gambia/yardstick.yaml @@ -0,0 +1,9 @@ +--- +project: yardstick +project-type: testing +release-model: stable + +branches: + - name: stable/gambia + location: + yardstick: 497292013ef0d7e1e014d76803d4f284618b4986 |