X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fapex%2Fapex.yml.j2;h=7466a83017371b0b30cd380d15f272823dc87414;hb=754888593ce1ed8658c355794eb246b563f4ed24;hp=dd8af6a28866d899706e5504525dc29ddfd6afa2;hpb=3de601e2194286afae4d44641508330032c6bded;p=releng.git diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2 index dd8af6a28..c878fe6af 100644 --- a/jjb/apex/apex.yml.j2 +++ b/jjb/apex/apex.yml.j2 @@ -6,35 +6,44 @@ - 'apex-verify-gate-{stream}' - 'apex-verify-unit-tests-{stream}' - 'apex-runner-cperf-{stream}' - - 'apex-build-{stream}' - 'apex-deploy-{platform}-{stream}' - 'apex-daily-master' - 'apex-daily-danube' - 'apex-csit-promote-daily-{stream}' - 'apex-fdio-promote-daily-{stream}' - - 'apex-verify-iso-{stream}' - - 'apex-deploy-test-baremetal-{stream}' + - 'apex-{scenario}-baremetal-{scenario_stream}' + - 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' - 'apex-upload-snapshot' - 'apex-create-snapshot' # stream: branch with - in place of / (eg. stable-arno) # branch: branch (eg. stable/arno) stream: - - master: + - master: &master branch: 'master' gs-pathname: '' build-slave: 'apex-build-master' virtual-slave: 'apex-virtual-master' baremetal-slave: 'apex-baremetal-master' verify-scenario: 'os-odl-nofeature-ha' + scenario_stream: 'master' - - danube: + - danube: &danube branch: 'stable/danube' gs-pathname: '/danube' build-slave: 'apex-build-danube' virtual-slave: 'apex-virtual-danube' baremetal-slave: 'apex-baremetal-danube' verify-scenario: 'os-odl_l3-nofeature-ha' - disabled: false + scenario_stream: 'danube' + disabled: true + + scenario: + {%- for stream in scenarios %} + {%- for scenario in scenarios[stream] %} + - '{{scenario}}': + <<: *{{stream}} + {%- endfor %} + {%- endfor %} platform: - 'baremetal' @@ -79,7 +88,7 @@ branch-pattern: '**/{branch}' file-paths: - compare-type: ANT - pattern: 'tests/**' + pattern: 'apex/tests/**' properties: - logrotate-default - throttle: @@ -133,15 +142,15 @@ branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'true' file-paths: - compare-type: ANT - pattern: 'ci/**' - - compare-type: ANT - pattern: 'build/**' + pattern: '**' + forbidden-file-paths: - compare-type: ANT - pattern: 'lib/**' + pattern: 'apex/tests/**' - compare-type: ANT - pattern: 'config/**' + pattern: 'docs/**' properties: - logrotate-default @@ -149,9 +158,6 @@ use-build-blocker: true block-level: 'NODE' blocking-jobs: - - 'apex-daily.*' - - 'apex-deploy.*' - - 'apex-runner.*' - 'apex-verify.*' - throttle: max-per-node: 1 @@ -224,7 +230,7 @@ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE node-parameters: true - kill-phase-on: FAILURE + kill-phase-on: NEVER abort-all-job: true git-revision: false @@ -277,6 +283,8 @@ pattern: 'lib/**' - compare-type: ANT pattern: 'config/**' + - compare-type: ANT + pattern: 'apex/**' properties: - logrotate-default @@ -284,10 +292,6 @@ use-build-blocker: true block-level: 'NODE' blocking-jobs: - - 'apex-daily.*' - - 'apex-deploy.*' - - 'apex-build.*' - - 'apex-runner.*' - 'apex-verify.*' - throttle: max-per-node: 1 @@ -309,10 +313,15 @@ GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + GERRIT_EVENT_COMMENT_TEXT=$GERRIT_EVENT_COMMENT_TEXT node-parameters: true 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 @@ -320,14 +329,14 @@ - 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 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE node-parameters: true - kill-phase-on: FAILURE + kill-phase-on: NEVER abort-all-job: true git-revision: false @@ -377,16 +386,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: @@ -395,78 +406,39 @@ 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: 90 + timeout: 140 fail: true - properties: - - logrotate-default - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' - - 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 @@ -475,41 +447,37 @@ 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' + - 'apex-workspace-cleanup' -# Deploy job -- job-template: - name: 'apex-deploy-{platform}-{stream}' - # Job template for virtual deployment - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - # branch: branch (eg. stable) - node: 'apex-{platform}-{stream}' +# Baremetal Deploy and Test +- job-template: + name: 'apex-{scenario}-baremetal-{scenario_stream}' - concurrent: true + project-type: 'multijob' disabled: false scm: - - git-scm-gerrit - - wrappers: - - timeout: - timeout: 120 - fail: true + - git-scm parameters: + - '{project}-defaults' + - '{project}-baremetal-{scenario_stream}-defaults' - project-parameter: project: '{project}' branch: '{branch}' @@ -517,52 +485,69 @@ gs-pathname: '{gs-pathname}' - string: name: DEPLOY_SCENARIO - default: '{verify-scenario}' + default: '{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.*' + - '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" - - 'apex-download-artifact' - - 'apex-deploy' - - 'apex-workspace-cleanup' + - multijob: + name: 'Baremetal Deploy' + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-baremetal-{scenario_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: 'OPNFV Test Suite' + projects: + - name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + publishers: + - groovy-postbuild: + script: + !include-raw-escape: ./update-build-result.groovy -# Baremetal Deploy and Test +# Baremetal test job - job-template: - name: 'apex-deploy-test-baremetal-{stream}' + name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' - # Job template for daily build - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - # branch: branch (eg. stable) project-type: 'multijob' disabled: false - scm: - - git-scm - parameters: - '{project}-defaults' - - '{project}-baremetal-{stream}-defaults' + - '{project}-baremetal-{scenario_stream}-defaults' - project-parameter: project: '{project}' branch: '{branch}' @@ -570,7 +555,7 @@ gs-pathname: '{gs-pathname}' - string: name: DEPLOY_SCENARIO - default: '{verify-scenario}' + default: '{scenario}' description: "Scenario to deploy with." properties: - logrotate-default @@ -579,29 +564,34 @@ block-level: 'NODE' blocking-jobs: - 'apex-verify.*' - - 'apex-deploy.*' - 'apex-runner.*' - 'apex-.*-promote.*' + - 'apex-run.*' + - 'apex-testsuite-.+-baremetal-.+' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' builders: - description-setter: - description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" + description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" - multijob: - name: 'Baremetal Deploy' + name: Functest condition: ALWAYS projects: - - name: 'apex-deploy-baremetal-{stream}' + - name: 'functest-apex-baremetal-daily-{scenario_stream}' node-parameters: true - current-parameters: true - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: FAILURE - abort-all-job: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: false git-revision: false - multijob: - name: Functest + name: Yardstick condition: ALWAYS projects: - - name: 'functest-apex-baremetal-daily-{stream}' + - name: 'yardstick-apex-baremetal-daily-{scenario_stream}' node-parameters: true current-parameters: false predefined-parameters: @@ -610,17 +600,40 @@ abort-all-job: false git-revision: false - multijob: - name: Yardstick + name: Dovetail condition: ALWAYS projects: - - name: 'yardstick-apex-baremetal-daily-{stream}' + - name: 'dovetail-apex-baremetal-proposed_tests-{scenario_stream}' node-parameters: true current-parameters: false predefined-parameters: DEPLOY_SCENARIO=$DEPLOY_SCENARIO kill-phase-on: NEVER + enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|nosdn-kvm|odl_l3-fdio)-ha/" abort-all-job: false git-revision: false + - multijob: + name: StorPerf + condition: ALWAYS + projects: + - name: 'storperf-apex-baremetal-daily-{scenario_stream}' + node-parameters: true + 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 +# Build status is always success due conditional plugin prefetching +# build status before multijob phases execute +# - conditional-step: +# condition-kind: current-status +# condition-worst: SUCCESS +# condtion-best: SUCCESS +# on-evaluation-failure: mark-unstable +# steps: +# - shell: 'echo "Tests Passed"' {% for stream in scenarios %} # {{ stream }} Daily @@ -665,7 +678,7 @@ current-parameters: false predefined-parameters: | GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_REFSPEC= GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE node-parameters: true @@ -679,9 +692,9 @@ - name: 'apex-verify-iso-{{ stream }}' current-parameters: false predefined-parameters: | - BUILD_DIRECTORY=apex-build-{{ stream }}/.build + BUILD_DIRECTORY=$WORKSPACE/../apex-build-{{ stream }}/.build GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_REFSPEC= GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE node-parameters: true @@ -693,11 +706,10 @@ condition: SUCCESSFUL projects: {% for scenario in scenarios[stream] %} - - name: 'apex-deploy-test-baremetal-{{ stream }}' + - name: 'apex-{{ scenario }}-baremetal-{{ stream }}' node-parameters: false current-parameters: false predefined-parameters: | - DEPLOY_SCENARIO={{scenario}} OPNFV_CLEAN=yes kill-phase-on: NEVER abort-all-job: true @@ -766,7 +778,6 @@ blocking-jobs: - 'apex-verify.*' - 'apex-deploy.*' - - 'apex-build.*' - 'apex-runner.*' - 'apex-daily.*' @@ -802,6 +813,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 @@ -828,7 +840,9 @@ condition: SUCCESSFUL projects: - name: 'apex-create-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=csit node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -838,7 +852,9 @@ condition: SUCCESSFUL projects: - name: 'apex-upload-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=csit node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -874,7 +890,6 @@ blocking-jobs: - 'apex-verify.*' - 'apex-deploy.*' - - 'apex-build.*' - 'apex-runner.*' - 'apex-daily.*' @@ -901,12 +916,13 @@ - name: 'apex-deploy-virtual-{stream}' current-parameters: false predefined-parameters: | - DEPLOY_SCENARIO=os-odl_l2-netvirt_gbp_fdio-noha + DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha 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 + PROMOTE=True node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -916,7 +932,9 @@ condition: SUCCESSFUL projects: - name: 'apex-create-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=fdio node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -926,36 +944,14 @@ condition: SUCCESSFUL projects: - name: 'apex-upload-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=fdio node-parameters: true kill-phase-on: FAILURE abort-all-job: true git-revision: false -- job-template: - name: 'apex-gs-clean-{stream}' - - # Job template for clean - # - # Required Variables: - # stream: branch with - in place of / (eg. stable) - node: '{slave}' - - disabled: false - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' - - builders: - - 'apex-gs-clean' - - triggers: - - 'apex-gs-clean-{stream}' - ######################## # parameter macros ######################## @@ -990,6 +986,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 @@ -1000,24 +1000,12 @@ - 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 -- builder: - name: 'apex-iso-verify' - builders: - - shell: - !include-raw: ./apex-iso-verify.sh - - builder: name: 'apex-upload-artifact' @@ -1031,12 +1019,6 @@ - shell: !include-raw: ./apex-download-artifact.sh -- builder: - name: 'apex-gs-cleanup' - builders: - - shell: - !include-raw: ./apex-gs-cleanup.sh - - builder: name: 'apex-deploy' builders: @@ -1048,13 +1030,10 @@ ######################## - trigger: name: 'apex-master' - triggers: - - timed: '0 3 1 1 7' -- trigger: - name: 'apex-danube' triggers: - timed: '0 12 * * *' - trigger: - name: 'apex-gs-clean-{stream}' + name: 'apex-danube' triggers: - - timed: '0 2 * * *' + - timed: '0 3 1 1 7' +