diff options
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/compass4nfv/compass-ci-jobs.yml | 14 | ||||
-rwxr-xr-x | jjb/dovetail/dovetail-run.sh | 33 | ||||
-rw-r--r-- | jjb/functest/functest-daily-jobs.yml | 256 | ||||
-rw-r--r-- | jjb/global/releng-macros.yml | 1 | ||||
-rw-r--r-- | jjb/releng/opnfv-utils.yml | 15 | ||||
-rwxr-xr-x | jjb/xci/xci-run-functest.sh | 12 | ||||
-rwxr-xr-x | jjb/xci/xci-set-scenario.sh | 78 | ||||
-rwxr-xr-x | jjb/xci/xci-start-deployment.sh | 12 | ||||
-rwxr-xr-x | jjb/xci/xci-start-new-vm.sh | 13 | ||||
-rw-r--r-- | jjb/xci/xci-verify-jobs.yml | 44 |
10 files changed, 230 insertions, 248 deletions
diff --git a/jjb/compass4nfv/compass-ci-jobs.yml b/jjb/compass4nfv/compass-ci-jobs.yml index d38a67bc4..1cf81a179 100644 --- a/jjb/compass4nfv/compass-ci-jobs.yml +++ b/jjb/compass4nfv/compass-ci-jobs.yml @@ -174,9 +174,6 @@ installer: '{installer}' gs-pathname: '{gs-pathname}' ppa-pathname: '{ppa-pathname}' - - string: - name: DEPLOY_SCENARIO - default: '{scenario}' - '{slave-label}-defaults' - '{installer}-defaults' @@ -435,6 +432,17 @@ name: LOG_DIRECTORY default: $WORKSPACE/log_output description: "Directory where the logs will be located upon the completion of the collection." + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-ha' + description: "Scenario to deploy with." + - string: + name: COMPASS_OS_VERSION + default: '' + - string: + name: COMPASS_OPENSTACK_VERSION + default: '' + ######################## # trigger macros diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index 451662abe..ec879e325 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -199,6 +199,27 @@ if [[ ! -f ${cirros_image} ]]; then fi sudo cp ${cirros_image} ${DOVETAIL_CONFIG} +# snaps_smoke test case needs to download this image first before running +ubuntu14_image=${image_path}/ubuntu-14.04-server-cloudimg-amd64-disk1.img +if [[ ! -f ${ubuntu14_image} ]]; then + echo "Download image ubuntu-14.04-server-cloudimg-amd64-disk1.img ..." + wget -q -nc https://cloud-images.ubuntu.com/releases/14.04/release/ubuntu-14.04-server-cloudimg-amd64-disk1.img -P ${image_path} +fi +sudo cp ${ubuntu14_image} ${DOVETAIL_CONFIG} + +# cloudify_ims test case needs to download these 2 images first before running +cloudify_image=${image_path}/cloudify-manager-premium-4.0.1.qcow2 +if [[ ! -f ${cloudify_image} ]]; then + echo "Download image cloudify-manager-premium-4.0.1.qcow2 ..." + wget -q -nc http://repository.cloudifysource.org/cloudify/4.0.1/sp-release/cloudify-manager-premium-4.0.1.qcow2 -P ${image_path} +fi +sudo cp ${cloudify_image} ${DOVETAIL_CONFIG} +trusty_image=${image_path}/trusty-server-cloudimg-amd64-disk1.img +if [[ ! -f ${trusty_image} ]]; then + echo "Download image trusty-server-cloudimg-amd64-disk1.img ..." + wget -q -nc http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img -P ${image_path} +fi +sudo cp ${trusty_image} ${DOVETAIL_CONFIG} opts="--privileged=true -id" @@ -238,18 +259,6 @@ if [ $(docker ps | grep "${DOCKER_REPO}:${DOCKER_TAG}" | wc -l) == 0 ]; then exit 1 fi -if [[ ! "${SUT_BRANCH}" =~ "danube" && ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_TYPE} == 'baremetal' ]]; then - source_cmd="source ${OPENRC}" - get_public_url_cmd="openstack --insecure endpoint list --service keystone --interface public | sed -n 4p | awk '{print \$14}'" - public_url=$(sudo docker exec "$container_id" /bin/bash -c "${source_cmd} && ${get_public_url_cmd}") - sed -i 's#OS_AUTH_URL=.*#OS_AUTH_URL='"${public_url}"'#g' ${OPENRC} - sed -i 's/internal/public/g' ${OPENRC} - if [[ ${public_url} =~ 'v2' ]]; then - sed -i "s/OS_IDENTITY_API_VERSION=3/OS_IDENTITY_API_VERSION=2.0/g" ${OPENRC} - fi - cat ${OPENRC} -fi - # Modify tempest_conf.yaml file tempest_conf_file=${DOVETAIL_CONFIG}/tempest_conf.yaml if [[ ${INSTALLER_TYPE} == 'compass' || ${INSTALLER_TYPE} == 'apex' ]]; then diff --git a/jjb/functest/functest-daily-jobs.yml b/jjb/functest/functest-daily-jobs.yml index 0f1ac351d..099d01a59 100644 --- a/jjb/functest/functest-daily-jobs.yml +++ b/jjb/functest/functest-daily-jobs.yml @@ -193,107 +193,22 @@ # <<: *master # ------------------------------- - functest-tier: - - 'healthcheck': - job-timeout: 20 - - 'smoke': - job-timeout: 180 - - 'components': - job-timeout: 240 - - 'vnf': - job-timeout: 240 - - features-suite: - - 'doctor-notification' - - 'promise' - - 'bgpvpn' - - 'functest-odl-sfc' - - 'domino-multinode' - - 'fds' - - 'barometercollectd' - - exclude: - - features-suite: 'promise' - stream: 'master' - - features-suite: 'domino-multinode' - stream: 'master' - - features-suite: 'fds' - stream: 'euphrates' - - build-job-settings: &build-job-settings - current-parameter: false - git-revision: true - node-parameters: false - kill-phase-on: FAILURE - abort-all-jobs: false - predefined-parameters: | - FUNCTEST_MODE=$FUNCTEST_MODE - FUNCTEST_TIER=$FUNCTEST_TIER - - features-job-settings: &features-job-settings - current-parameter: false - git-revision: true - node-parameters: false - kill-phase-on: FAILURE - abort-all-jobs: false - predefined-parameters: | - FUNCTEST_MODE=$FUNCTEST_MODE - FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME + testsuite: + - 'suite': + job-timeout: 60 + - 'daily': + job-timeout: 300 + - 'arm-daily': + job-timeout: 300 jobs: - - 'functest-{installer}-{pod}-suite-{stream}' - - 'functest-{installer}-{pod}-daily-{stream}' - - 'functest-{installer}-{pod}-daily-{functest-tier}-{stream}' - - 'functest-{installer}-{pod}-daily-features-{features-suite}-{stream}' + - 'functest-{installer}-{pod}-{testsuite}-{stream}' + ################################ # job template ################################ - job-template: - - name: 'functest-{installer}-{pod}-daily-{stream}' - - project-type: multijob - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults' - - functest-parameter: - gs-pathname: '{gs-pathname}' - - builders: - - multijob: - name: 'Run functest tests' - execution-type: SEQUENTIAL - projects: - - name: 'functest-{installer}-{pod}-daily-healthcheck-{stream}' - <<: *build-job-settings - - name: 'functest-{installer}-{pod}-daily-smoke-{stream}' - <<: *build-job-settings - - name: 'functest-{installer}-{pod}-daily-vnf-{stream}' - <<: *build-job-settings - - name: 'functest-{installer}-{pod}-daily-features-doctor-notification-{stream}' - <<: *features-job-settings - - name: 'functest-{installer}-{pod}-daily-features-bgpvpn-{stream}' - <<: *features-job-settings - - name: 'functest-{installer}-{pod}-daily-features-functest-odl-sfc-{stream}' - <<: *features-job-settings - - name: 'functest-{installer}-{pod}-daily-features-barometercollectd-{stream}' - <<: *features-job-settings - - name: 'functest-{installer}-{pod}-daily-features-fds-{stream}' - <<: *features-job-settings - - name: 'functest-{installer}-{pod}-daily-features-promise-{stream}' - <<: *features-job-settings - - name: 'functest-{installer}-{pod}-daily-features-domino-multinode-{stream}' - <<: *features-job-settings - -- job-template: &functest-installer-tier-job - - name: 'functest-{installer}-{pod}-daily-{functest-tier}-{stream}' + name: 'functest-{installer}-{pod}-{testsuite}-{stream}' concurrent: true @@ -317,15 +232,10 @@ branch: '{branch}' - '{installer}-defaults' - '{slave-label}-defaults' - - string: - name: FUNCTEST_MODE - default: 'tier' - - string: - name: FUNCTEST_TIER - default: '{functest-tier}' + - 'functest-{testsuite}-parameter' - string: name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-noha' + default: 'os-odl_l2-nofeature-ha' - string: name: CLEAN_DOCKER_IMAGES default: 'false' @@ -339,93 +249,7 @@ builders: - description-setter: description: "Built on $NODE_NAME" - - 'functest-daily-builder' - - publishers: - - 'functest-recipients' - - 'fuel-recipients' - -- job-template: - - name: 'functest-{installer}-{pod}-suite-{stream}' - <<: *functest-installer-tier-job - - wrappers: - - build-name: - name: '$BUILD_NUMBER Suite: $FUNCTEST_MODE Scenario: $DEPLOY_SCENARIO' - - timeout: - timeout: '60' - abort: true - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults' - - 'functest-suite-parameter' - - string: - name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-noha' - - string: - name: CLEAN_DOCKER_IMAGES - default: 'false' - description: 'Remove downloaded docker images (opnfv/functest*:*)' - - functest-parameter: - gs-pathname: '{gs-pathname}' - - builders: - - description-setter: - description: "Built on $NODE_NAME" - - 'functest-suite-builder' - -- job-template: - - name: 'functest-{installer}-{pod}-daily-features-{features-suite}-{stream}' - concurrent: true - properties: - - logrotate-default - - throttle: - enabled: true - max-per-node: 1 - option: 'project' - wrappers: - - build-name: - name: '$BUILD_NUMBER Suite: $FUNCTEST_MODE Scenario: $DEPLOY_SCENARIO' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults' - - string: - name: FUNCTEST_MODE - default: 'testcase' - - string: - name: FUNCTEST_SUITE_NAME - default: '{features-suite}' - - string: - name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-noha' - - string: - name: CLEAN_DOCKER_IMAGES - default: 'false' - description: 'Remove downloaded docker images (opnfv/functest*:*)' - - functest-parameter: - gs-pathname: '{gs-pathname}' - - scm: - - git-scm - - builders: - - description-setter: - description: "Built on $NODE_NAME" - - 'functest-daily-builder' - - publishers: - - 'functest-features-recipients' - - 'functest-recipients' - - 'fuel-recipients' + - 'functest-{testsuite}-builder' ######################## @@ -440,6 +264,14 @@ description: "Daily suite name to run" - parameter: + name: functest-arm-daily-parameter + parameters: + - string: + name: FUNCTEST_MODE + default: 'arm-daily' + description: "Daily suite name (Aarch64) to run" + +- parameter: name: functest-suite-parameter parameters: - choice: @@ -532,6 +364,14 @@ - 'functest-exit' - builder: + name: functest-arm-daily-builder + builders: + - 'functest-cleanup' + - 'functest-arm-daily' + - 'functest-store-results' + - 'functest-exit' + +- builder: name: functest-suite-builder builders: - 'functest-cleanup' @@ -565,6 +405,17 @@ # yamllint enable rule:indentation - builder: + name: functest-arm-daily + builders: + # yamllint disable rule:indentation + - shell: + !include-raw: + - ./functest-env-presetup.sh + - ../../utils/fetch_os_creds.sh + - ./functest-alpine.sh + +# yamllint enable rule:indentation +- builder: name: functest-store-results builders: - shell: @@ -581,30 +432,3 @@ builders: - shell: !include-raw: ./functest-exit.sh - - -- publisher: - name: 'functest-features-recipients' - publishers: - - email: - recipients: - -- publisher: - name: 'functest-recipients' - publishers: - - email: - recipients: > - jalausuch@suse.com morgan.richomme@orange.com - cedric.ollivier@orange.com feng.xiaowei@zte.com.cn - juha.kosonen@nokia.com wangwulin@huawei.com - delia.popescu@enea.com cristina.pauna@enea.com - valentin.boucher@kontron.com - - email-jenkins-admins-on-failure - -- publisher: - name: 'fuel-recipients' - publishers: - - email: - recipients: > - peter.barabas@ericsson.com mpolenchuck@mirantis.com - alexandru.avadanii@enea.com guillermo.herrero@enea.com diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index e58e1cfee..3433cee5f 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -965,6 +965,7 @@ - shell: !include-raw-escape: installer-report.sh - postbuildscript: + script-only-if-succeeded: false script-only-if-failed: true builders: - shell: | diff --git a/jjb/releng/opnfv-utils.yml b/jjb/releng/opnfv-utils.yml index 93b3615ef..fb3bab42b 100644 --- a/jjb/releng/opnfv-utils.yml +++ b/jjb/releng/opnfv-utils.yml @@ -89,7 +89,6 @@ name: 'check-status-of-slaves' disabled: false - concurrent: true parameters: @@ -97,17 +96,23 @@ name: SLAVE_NAME description: 'script lives on master node' default-slaves: - - master + - lf-build1 allowed-multiselect: false ignore-offline-nodes: true + - project-parameter: + project: releng + branch: master + + scm: + - git-scm triggers: - timed: '@midnight' builders: - shell: | - cd /opt/jenkins-ci/slavemonitor - bash slave-monitor-0.1.sh | sort + cd $WORKSPACE/utils/ + bash slave-monitor-0.1.sh - job-template: name: 'ansible-build-server' @@ -162,7 +167,7 @@ builders: - shell: | # run playbook - sudo ansible-playbook -C -D -i \ + sudo ansible-playbook -i \ $WORKSPACE/utils/build-server-ansible/inventory.ini \ $WORKSPACE/utils/build-server-ansible/main.yml diff --git a/jjb/xci/xci-run-functest.sh b/jjb/xci/xci-run-functest.sh index b2421de32..39d4ea190 100755 --- a/jjb/xci/xci-run-functest.sh +++ b/jjb/xci/xci-run-functest.sh @@ -20,6 +20,18 @@ if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then exit 0 fi +# if the scenario is external, we need to wipe WORKSPACE to place releng-xci there since +# the project where the scenario is coming from is cloned and the patch checked out to the +# xci/scenarios/$DEPLOY_SCENARIO to be synched on clean VM +# apart from that, we need releng-xci stuff in WORKSPACE for things to function correctly on Jenkins. +# if the change is coming to releng-xci, we don't need to do anything since the patch is checked +# out to the WORKSPACE anyways +if [[ $GERRIT_PROJECT != "releng-xci" ]]; then + cd $HOME && /bin/rm -rf $WORKSPACE + git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE && cd $WORKSPACE + chmod -R go-rwx $WORKSPACE/xci/scripts/vm +fi + # skip the deployment if the scenario is not supported on this distro OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then diff --git a/jjb/xci/xci-set-scenario.sh b/jjb/xci/xci-set-scenario.sh new file mode 100755 index 000000000..4fffafbbb --- /dev/null +++ b/jjb/xci/xci-set-scenario.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 SUSE 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 errexit +set -o nounset +set -o pipefail + +#---------------------------------------------------------------------- +# 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. +#---------------------------------------------------------------------- + +# ensure GERRIT_TOPIC is set +GERRIT_TOPIC="${GERRIT_TOPIC:-''}" +# skip the healthcheck if the patch doesn't impact the deployment +if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then + echo "Skipping the healthcheck!" + exit 0 +fi + +# if the scenario is external, we need to wipe WORKSPACE to place releng-xci there since +# the project where the scenario is coming from is cloned and the patch checked out to the +# xci/scenarios/$DEPLOY_SCENARIO to be synched on clean VM +# apart from that, we need releng-xci stuff in WORKSPACE for things to function correctly on Jenkins. +# if the change is coming to releng-xci, we don't need to do anything since the patch is checked +# out to the WORKSPACE anyways +if [[ $GERRIT_PROJECT != "releng-xci" ]]; then + cd $HOME && /bin/rm -rf $WORKSPACE + git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE && cd $WORKSPACE + chmod -R go-rwx $WORKSPACE/xci/scripts/vm +fi + +WORK_DIRECTORY=/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO +/bin/rm -rf $WORK_DIRECTORY && mkdir -p $WORK_DIRECTORY + +# if change is coming to releng-xci, continue as usual until that part is fixed as well +if [[ $GERRIT_PROJECT == "releng-xci" ]]; then + # save the scenario name into java properties file to be injected to downstream jobs via envInject + echo "Recording scenario name for downstream jobs" + echo "DEPLOY_SCENARIO=os-nosdn-nofeature" > $WORK_DIRECTORY/scenario.properties + exit 0 +fi + +# projects develop different scenarios and jobs need to know which scenario got the +# change under test so the jobs can deploy and test the right scenario. +# we need to fetch the change and look at the changeset to find out the scenario instead +# of hardcoding scenario per project. + +git clone https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT $WORK_DIRECTORY/$GERRIT_PROJECT +cd $WORK_DIRECTORY/$GERRIT_PROJECT +git fetch https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT $GERRIT_REFSPEC && git checkout FETCH_HEAD +DEPLOY_SCENARIO=$(git diff HEAD^..HEAD --name-only | grep scenarios | sed -r 's/scenarios\/(.*?)\/.*/\1/' | uniq) + +# ensure single scenario is impacted +if [[ $(echo $DEPLOY_SCENARIO | wc -w) != 1 ]]; then + echo "Change impacts multiple scenarios!" + echo "XCI doesn't support testing of changes that impact multiple scenarios currently." + echo "Please split your change into multiple different/dependent changes, each modifying single scenario." + exit 1 +fi + +# save the scenario name into java properties file to be injected to downstream jobs via envInject +echo "Recording scenario name '$DEPLOY_SCENARIO' for downstream jobs" +echo "DEPLOY_SCENARIO=$DEPLOY_SCENARIO" > $WORK_DIRECTORY/scenario.properties + +# skip the deployment if the scenario is not supported on this distro +OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml +if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then + echo "# SKIPPED: Scenario $DEPLOY_SCENARIO is NOT supported on $DISTRO" + exit 0 +fi diff --git a/jjb/xci/xci-start-deployment.sh b/jjb/xci/xci-start-deployment.sh index e86f5b3a1..cb75b511e 100755 --- a/jjb/xci/xci-start-deployment.sh +++ b/jjb/xci/xci-start-deployment.sh @@ -20,6 +20,18 @@ if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then exit 0 fi +# if the scenario is external, we need to wipe WORKSPACE to place releng-xci there since +# the project where the scenario is coming from is cloned and the patch checked out to the +# xci/scenarios/$DEPLOY_SCENARIO to be synched on clean VM +# apart from that, we need releng-xci stuff in WORKSPACE for things to function correctly on Jenkins. +# if the change is coming to releng-xci, we don't need to do anything since the patch is checked +# out to the WORKSPACE anyways +if [[ $GERRIT_PROJECT != "releng-xci" ]]; then + cd $HOME && /bin/rm -rf $WORKSPACE + git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE && cd $WORKSPACE + chmod -R go-rwx $WORKSPACE/xci/scripts/vm +fi + # skip the deployment if the scenario is not supported on this distro OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then diff --git a/jjb/xci/xci-start-new-vm.sh b/jjb/xci/xci-start-new-vm.sh index 2c6ec3fad..d676e2662 100755 --- a/jjb/xci/xci-start-new-vm.sh +++ b/jjb/xci/xci-start-new-vm.sh @@ -20,6 +20,18 @@ if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then exit 0 fi +# if the scenario is external, we need to wipe WORKSPACE to place releng-xci there since +# the project where the scenario is coming from is cloned and the patch checked out to the +# xci/scenarios/$DEPLOY_SCENARIO to be synched on clean VM +# apart from that, we need releng-xci stuff in WORKSPACE for things to function correctly on Jenkins. +# if the change is coming to releng-xci, we don't need to do anything since the patch is checked +# out to the WORKSPACE anyways +if [[ $GERRIT_PROJECT != "releng-xci" ]]; then + cd $HOME && /bin/rm -rf $WORKSPACE + git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE && cd $WORKSPACE + chmod -R go-rwx $WORKSPACE/xci/scripts/vm +fi + # skip the deployment if the scenario is not supported on this distro OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then @@ -35,6 +47,7 @@ cd $WORKSPACE # yourself. cat > xci_test.sh<<EOF #!/bin/bash +set -o pipefail export DISTRO=$DISTRO export DEPLOY_SCENARIO=$DEPLOY_SCENARIO export FUNCTEST_MODE=$FUNCTEST_MODE diff --git a/jjb/xci/xci-verify-jobs.yml b/jjb/xci/xci-verify-jobs.yml index c6b6bc43b..3902e8e2e 100644 --- a/jjb/xci/xci-verify-jobs.yml +++ b/jjb/xci/xci-verify-jobs.yml @@ -102,7 +102,7 @@ comment-contains-value: 'reverify' projects: - project-compare-type: 'ANT' - project-pattern: '{project}' + project-pattern: 'releng-xci' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' @@ -110,6 +110,15 @@ forbidden-file-paths: - compare-type: ANT pattern: 'xci/scripts/vm/**' + - project-compare-type: 'REG_EXP' + project-pattern: 'sfc|bgpvpn' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'true' + file-paths: + - compare-type: ANT + pattern: 'scenarios/**' readable-message: true custom-url: '* $JOB_NAME $BUILD_URL' skip-vote: @@ -120,12 +129,15 @@ parameters: - project-parameter: - project: '{project}' + project: $GERRIT_PROJECT branch: '{branch}' - label: name: SLAVE_LABEL default: 'xci-virtual' - string: + name: DISTRO + default: '{distro}' + - string: name: CLEAN_DIB_IMAGES default: 'true' - string: @@ -134,8 +146,11 @@ description: 'Git URL to use on this Jenkins Slave' builders: + - 'xci-verify-set-scenario-macro' + - inject: + properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties" - description-setter: - description: "Built on $NODE_NAME" + description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME" - multijob: name: deploy condition: SUCCESSFUL @@ -144,8 +159,8 @@ current-parameters: true predefined-parameters: | DISTRO={distro} - DEPLOY_SCENARIO=os-nosdn-nofeature CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES + GERRIT_PROJECT=$GERRIT_PROJECT GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER @@ -161,14 +176,14 @@ current-parameters: true predefined-parameters: | DISTRO={distro} - DEPLOY_SCENARIO=os-nosdn-nofeature CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES - FUNCTEST_MODE=tier - FUNCTEST_TIER=healthcheck + GERRIT_PROJECT=$GERRIT_PROJECT GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + FUNCTEST_MODE=tier + FUNCTEST_TIER=healthcheck node-parameters: true kill-phase-on: NEVER abort-all-job: true @@ -194,14 +209,11 @@ parameters: - string: name: PROJECT - default: 'releng-xci' + default: $GERRIT_PROJECT - string: name: DISTRO default: 'ubuntu' - string: - name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature' - - string: name: FUNCTEST_MODE default: 'tier' - string: @@ -225,6 +237,8 @@ description: 'Git URL to use on this Jenkins Slave' wrappers: + - inject: + properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties" - ssh-agent-wrapper - build-timeout: timeout: 240 @@ -235,13 +249,19 @@ builders: - description-setter: - description: "Built on $NODE_NAME" + description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME" - 'xci-verify-{phase}-macro' # ------------------------------- # builder macros # ------------------------------- - builder: + name: 'xci-verify-set-scenario-macro' + builders: + - shell: + !include-raw: ./xci-set-scenario.sh + +- builder: name: 'xci-verify-deploy-macro' builders: - shell: |