X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fapex%2Fapex.yml.j2;h=99076fbc6cd43bb3bff4d21d5202ea33d67e8b81;hb=7ca959d57760b61dca8fa862a5da90733affb264;hp=bd72bf6499def1cb3459693a6be54ee18ac02a41;hpb=1ee5712c4535807e90111c4a675404b1e17ebab9;p=releng.git diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2 index bd72bf649..a8fc70f0c 100644 --- a/jjb/apex/apex.yml.j2 +++ b/jjb/apex/apex.yml.j2 @@ -6,17 +6,17 @@ - 'apex-verify-gate-{stream}' - 'apex-verify-unit-tests-{stream}' - 'apex-runner-cperf-{stream}' - - 'apex-build-{stream}' + - 'apex-virtual-{stream}' - 'apex-deploy-{platform}-{stream}' - - 'apex-daily-master' - - 'apex-daily-danube' + - 'apex-daily-{stream}' - 'apex-csit-promote-daily-{stream}' - 'apex-fdio-promote-daily-{stream}' - - 'apex-verify-iso-{stream}' - 'apex-{scenario}-baremetal-{scenario_stream}' - 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' - 'apex-upload-snapshot' - 'apex-create-snapshot' + - 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}' + - 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube' # stream: branch with - in place of / (eg. stable-arno) # branch: branch (eg. stable/arno) stream: @@ -27,9 +27,15 @@ virtual-slave: 'apex-virtual-master' baremetal-slave: 'apex-baremetal-master' verify-scenario: 'os-odl-nofeature-ha' - concurrent-builds: 3 scenario_stream: 'master' - + - euphrates: &euphrates + branch: 'stable/euphrates' + gs-pathname: '/euphrates' + build-slave: 'apex-build-master' + virtual-slave: 'apex-virtual-master' + baremetal-slave: 'apex-baremetal-master' + verify-scenario: 'os-odl-nofeature-ha' + scenario_stream: 'euphrates' - danube: &danube branch: 'stable/danube' gs-pathname: '/danube' @@ -37,7 +43,6 @@ virtual-slave: 'apex-virtual-danube' baremetal-slave: 'apex-baremetal-danube' verify-scenario: 'os-odl_l3-nofeature-ha' - concurrent-builds: 1 scenario_stream: 'danube' disabled: true @@ -90,9 +95,37 @@ branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'false' file-paths: - compare-type: ANT - pattern: 'tests/**' + pattern: 'apex/tests/**' + forbidden-file-paths: + - compare-type: ANT + pattern: '*' + - compare-type: ANT + pattern: 'apex/*' + - compare-type: ANT + pattern: 'build/**' + - compare-type: ANT + pattern: 'lib/**' + - compare-type: ANT + pattern: 'config/**' + - compare-type: ANT + pattern: 'apex/build/**' + - compare-type: ANT + pattern: 'apex/common/**' + - compare-type: ANT + pattern: 'apex/inventory/**' + - compare-type: ANT + pattern: 'apex/network/**' + - compare-type: ANT + pattern: 'apex/overcloud/**' + - compare-type: ANT + pattern: 'apex/settings/**' + - compare-type: ANT + pattern: 'apex/undercloud/**' + - compare-type: ANT + pattern: 'apex/virtual/**' properties: - logrotate-default - throttle: @@ -146,15 +179,39 @@ branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'true' file-paths: - compare-type: ANT - pattern: 'ci/**' + pattern: '*' + - compare-type: ANT + pattern: 'apex/*' - compare-type: ANT pattern: 'build/**' - compare-type: ANT pattern: 'lib/**' - compare-type: ANT pattern: 'config/**' + - compare-type: ANT + pattern: 'apex/build/**' + - compare-type: ANT + pattern: 'apex/common/**' + - compare-type: ANT + pattern: 'apex/inventory/**' + - compare-type: ANT + pattern: 'apex/network/**' + - compare-type: ANT + pattern: 'apex/overcloud/**' + - compare-type: ANT + pattern: 'apex/settings/**' + - compare-type: ANT + pattern: 'apex/undercloud/**' + - compare-type: ANT + pattern: 'apex/virtual/**' + forbidden-file-paths: + - compare-type: ANT + pattern: 'apex/tests/**' + - compare-type: ANT + pattern: 'docs/**' properties: - logrotate-default @@ -201,7 +258,7 @@ name: deploy-virtual condition: SUCCESSFUL projects: - - name: 'apex-deploy-virtual-{stream}' + - name: 'apex-virtual-{stream}' current-parameters: false predefined-parameters: | ARTIFACT_VERSION=$ARTIFACT_VERSION @@ -215,23 +272,6 @@ 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: NEVER - abort-all-job: true - git-revision: false # Verify Scenario Gate - job-template: @@ -282,11 +322,19 @@ pattern: 'lib/**' - compare-type: ANT pattern: 'config/**' + - compare-type: ANT + pattern: 'apex/**' properties: - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-virtual.*' - throttle: - max-per-node: 3 + max-per-node: 1 max-total: 10 option: 'project' @@ -310,6 +358,10 @@ kill-phase-on: FAILURE abort-all-job: true git-revision: true + - shell: | + echo DEPLOY_SCENARIO=$(echo $GERRIT_EVENT_COMMENT_TEXT | grep start-gate-scenario | grep -Eo 'os-.*') > detected_scenario + - inject: + properties-file: detected_scenario - multijob: name: functest-smoke condition: SUCCESSFUL @@ -317,7 +369,7 @@ - name: 'functest-apex-virtual-suite-{stream}' current-parameters: false predefined-parameters: | - DEPLOY_SCENARIO={verify-scenario} + DEPLOY_SCENARIO=$DEPLOY_SCENARIO FUNCTEST_SUITE_NAME=healthcheck GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC @@ -394,117 +446,78 @@ abort-all-job: false git-revision: false -# Build phase +# Deploy job - job-template: - name: 'apex-build-{stream}' - - # Job template for builds - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - # branch: branch (eg. stable) - node: '{build-slave}' + name: 'apex-deploy-{platform}-{stream}' - disabled: false + node: 'apex-{platform}-{stream}' concurrent: true - parameters: - - '{project}-defaults' - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' - + disabled: false + quiet-period: 30 scm: - git-scm-gerrit wrappers: - timeout: - timeout: 150 + timeout: 140 fail: true - properties: - - logrotate-default - - throttle: - max-per-node: {concurrent-builds} - max-total: 10 - option: 'project' - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-verify-iso-{stream}' - - builders: - - 'apex-build' - - inject: - properties-content: ARTIFACT_TYPE=rpm - - 'apex-upload-artifact' - -# ISO verify job -- job-template: - name: 'apex-verify-iso-{stream}' - - # Job template for builds - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - # branch: branch (eg. stable) - node: '{virtual-slave}' - - disabled: false - - concurrent: true - parameters: + - '{project}-{platform}-{stream}-defaults' - project-parameter: project: '{project}' branch: '{branch}' - apex-parameter: gs-pathname: '{gs-pathname}' - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: "Used for overriding the GIT URL coming from parameters macro." - - scm: - - git-scm + name: DEPLOY_SCENARIO + default: '{verify-scenario}' + description: "Scenario to deploy with." + - string: + name: OPNFV_CLEAN + default: 'no' + description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment" properties: - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-deploy.*' + - 'functest.*' + - 'yardstick.*' + - 'dovetail.*' + - 'storperf.*' - throttle: max-per-node: 1 max-total: 10 option: 'project' builders: - - 'apex-iso-verify' - - inject: - properties-content: ARTIFACT_TYPE=iso - - 'apex-upload-artifact' + - description-setter: + description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - 'apex-download-artifact' + - 'apex-deploy' + - 'clean-workspace' -# Deploy job -- job-template: - name: 'apex-deploy-{platform}-{stream}' - node: 'apex-{platform}-{stream}' +# Virtual Deploy and Test +- job-template: + name: 'apex-virtual-{stream}' - concurrent: true + project-type: 'multijob' disabled: false scm: - git-scm-gerrit - wrappers: - - timeout: - timeout: 120 - fail: true - parameters: - - '{project}-{platform}-{stream}-defaults' + - '{project}-defaults' + - '{project}-virtual-{stream}-defaults' - project-parameter: project: '{project}' branch: '{branch}' @@ -515,33 +528,62 @@ default: '{verify-scenario}' description: "Scenario to deploy with." - string: - name: OPNFV_CLEAN - default: 'no' - description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment" - + name: ARTIFACT_VERSION + default: dev + description: "Used for overriding the ARTIFACT_VERSION" properties: - logrotate-default - build-blocker: use-build-blocker: true block-level: 'NODE' blocking-jobs: - - 'apex-deploy.*' - - 'functest.*' - - 'yardstick.*' - - 'dovetail.*' - - 'storperf.*' + - 'apex-runner.*' + - 'apex-.*-promote.*' + - 'apex-run.*' + - 'apex-virtual-.*' + - 'apex-verify-gate-.*' - throttle: max-per-node: 1 max-total: 10 option: 'project' - builders: - description-setter: description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" - - 'apex-download-artifact' - - 'apex-deploy' - - 'apex-workspace-cleanup' - + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + ARTIFACT_VERSION=$ARTIFACT_VERSION + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + OPNFV_CLEAN=yes + 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: true + - multijob: + name: functest-smoke + condition: SUCCESSFUL + projects: + - name: 'functest-apex-virtual-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=$DEPLOY_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: NEVER + abort-all-job: true + git-revision: false # Baremetal Deploy and Test - job-template: @@ -700,6 +742,7 @@ current-parameters: false predefined-parameters: DEPLOY_SCENARIO=$DEPLOY_SCENARIO + enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-nosdn-nofeature-ha/" kill-phase-on: NEVER abort-all-job: false git-revision: false @@ -713,10 +756,8 @@ # steps: # - shell: 'echo "Tests Passed"' -{% for stream in scenarios %} -# {{ stream }} Daily - job-template: - name: 'apex-daily-{{ stream }}' + name: 'apex-daily-{stream}' # Job template for daily build # @@ -725,7 +766,7 @@ # branch: branch (eg. stable) project-type: 'multijob' - node: '{{ build_slave[stream] }}' + node: '{baremetal-slave}' disabled: false @@ -734,25 +775,25 @@ parameters: - '{project}-defaults' - - '{project}-baremetal-{{ stream }}-defaults' + - '{project}-baremetal-{stream}-defaults' - project-parameter: project: '{project}' - branch: '{{ branch[stream] }}' + branch: '{branch}' - apex-parameter: - gs-pathname: '{{ gspathname[stream] }}' + gs-pathname: '{gs-pathname}' properties: - logrotate-default triggers: - - 'apex-{{ stream }}' + - 'apex-{stream}' builders: - multijob: name: build condition: SUCCESSFUL projects: - - name: 'apex-build-{{ stream }}' + - name: 'apex-build-{stream}' current-parameters: false predefined-parameters: | GERRIT_BRANCH=$GERRIT_BRANCH @@ -767,10 +808,10 @@ name: 'Verify and upload ISO' condition: SUCCESSFUL projects: - - name: 'apex-verify-iso-{{ stream }}' + - name: 'apex-verify-iso-{stream}' current-parameters: false predefined-parameters: | - BUILD_DIRECTORY=$WORKSPACE/../apex-build-{{ stream }}/.build + BUILD_DIRECTORY=$WORKSPACE/../apex-build-{stream}/.build GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC= GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER @@ -779,21 +820,7 @@ kill-phase-on: FAILURE abort-all-job: true git-revision: true - - multijob: - name: Baremetal Deploy and Test Phase - condition: SUCCESSFUL - projects: -{% for scenario in scenarios[stream] %} - - name: 'apex-{{ scenario }}-baremetal-{{ stream }}' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false -{% endfor %} -{% endfor %} + - apex-builder-{stream} # snapshot create - job-template: @@ -1030,6 +1057,152 @@ abort-all-job: true git-revision: false +# Flex job +- job-template: + name: 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}' + + project-type: 'multijob' + + disabled: false + + node: 'flex-pod2' + + scm: + - git-scm + triggers: + - 'apex-{stream}' + parameters: + - '{project}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-ha' + description: "Scenario to deploy with." + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-runner.*' + - 'apex-.*-promote.*' + - 'apex-run.*' + - 'apex-.+-baremetal-.+' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + builders: + - description-setter: + description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - multijob: + name: 'Baremetal Deploy' + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-baremetal-{stream}' + node-parameters: true + current-parameters: true + predefined-parameters: | + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: Yardstick + condition: ALWAYS + projects: + - name: 'yardstick-apex-baremetal-daily-{stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: false + git-revision: false + +# Dovetail Danube test job +- job-template: + name: 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube' + + project-type: 'multijob' + + node: 'huawei-pod4' + + disabled: false + + parameters: + - '{project}-defaults' + - project-parameter: + project: '{project}' + branch: 'stable/danube' + - apex-parameter: + gs-pathname: '/danube' + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-ha' + description: "Scenario to deploy with." + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-runner.*' + - 'apex-.*-promote.*' + - 'apex-run.*' + + triggers: + - timed: '0 12 * * *' + + builders: + - description-setter: + description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + - multijob: + name: 'Baremetal Deploy' + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-baremetal-danube' + node-parameters: true + current-parameters: true + predefined-parameters: | + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: FAILURE + abort-all-job: true + git-revision: false + - multijob: + name: Dovetail + condition: ALWAYS + projects: + - name: 'dovetail-apex-baremetal-proposed_tests-danube' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: false + git-revision: false + ######################## # parameter macros ######################## @@ -1072,30 +1245,32 @@ ######################## # builder macros ######################## +{% for stream in scenarios %} +# {{ stream }} Builder - builder: - name: 'apex-unit-test' - builders: - - shell: - !include-raw: ./apex-unit-test.sh - -- builder: - name: 'apex-build' - builders: - - shell: - !include-raw: ./apex-build.sh - -- builder: - name: 'apex-workspace-cleanup' - builders: - - shell: - !include-raw: ./apex-workspace-cleanup.sh + name: apex-builder-{{ stream }} + builders: + - multijob: + name: Baremetal Deploy and Test Phase + condition: SUCCESSFUL + projects: +{% for scenario in scenarios[stream] %} + - name: 'apex-{{ scenario }}-baremetal-{{ stream }}' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false +{% endfor %} +{% endfor %} - builder: - name: 'apex-iso-verify' + name: 'apex-unit-test' builders: - shell: - !include-raw: ./apex-iso-verify.sh - + !include-raw: ./apex-unit-test.sh - builder: name: 'apex-upload-artifact' @@ -1120,6 +1295,10 @@ ######################## - trigger: name: 'apex-master' + triggers: + - timed: '0 3 1 1 7' +- trigger: + name: 'apex-euphrates' triggers: - timed: '0 12 * * *' - trigger: