X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=jjb%2Fapex%2Fapex.yml.j2;h=7466a83017371b0b30cd380d15f272823dc87414;hb=754888593ce1ed8658c355794eb246b563f4ed24;hp=d739a70683216272c784fe63c7fef79bf9bc892d;hpb=076e3ee6a990acc801554edfc63798dc42c32707;p=releng.git diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2 index d739a7068..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,11 +158,9 @@ use-build-blocker: true block-level: 'NODE' blocking-jobs: - - 'apex-daily.*' - - 'apex-deploy.*' - - 'apex-runner.*' + - 'apex-verify.*' - throttle: - max-per-node: 3 + max-per-node: 1 max-total: 10 option: 'project' @@ -223,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 @@ -276,6 +283,8 @@ pattern: 'lib/**' - compare-type: ANT pattern: 'config/**' + - compare-type: ANT + pattern: 'apex/**' properties: - logrotate-default @@ -283,11 +292,9 @@ use-build-blocker: true block-level: 'NODE' blocking-jobs: - - 'apex-daily.*' - - 'apex-deploy.*' - - 'apex-runner.*' + - 'apex-verify.*' - throttle: - max-per-node: 3 + max-per-node: 1 max-total: 10 option: 'project' @@ -306,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 @@ -317,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 @@ -374,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: @@ -392,121 +406,26 @@ abort-all-job: false git-revision: false -# Build phase -- 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}' - - disabled: false - - concurrent: true - - parameters: - - '{project}-defaults' - - project-parameter: - project: '{project}' - branch: '{branch}' - - apex-parameter: - gs-pathname: '{gs-pathname}' - - scm: - - git-scm-gerrit - - wrappers: - - timeout: - timeout: 90 - fail: true - - properties: - - logrotate-default - - throttle: - max-per-node: 3 - 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-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 - - properties: - - logrotate-default - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-deploy.*' - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' - - builders: - - 'apex-iso-verify' - - inject: - properties-content: ARTIFACT_TYPE=iso - - 'apex-upload-artifact' - # 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}' concurrent: true disabled: false - + quiet-period: 30 scm: - git-scm-gerrit wrappers: - timeout: - timeout: 120 + timeout: 140 fail: true parameters: + - '{project}-{platform}-{stream}-defaults' - project-parameter: project: '{project}' branch: '{branch}' @@ -530,6 +449,8 @@ - 'apex-deploy.*' - 'functest.*' - 'yardstick.*' + - 'dovetail.*' + - 'storperf.*' - throttle: max-per-node: 1 max-total: 10 @@ -545,13 +466,8 @@ # Baremetal Deploy and Test - job-template: - name: 'apex-deploy-test-baremetal-{stream}' + name: 'apex-{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 @@ -561,7 +477,7 @@ parameters: - '{project}-defaults' - - '{project}-baremetal-{stream}-defaults' + - '{project}-baremetal-{scenario_stream}-defaults' - project-parameter: project: '{project}' branch: '{branch}' @@ -569,7 +485,7 @@ gs-pathname: '{gs-pathname}' - string: name: DEPLOY_SCENARIO - default: '{verify-scenario}' + default: '{scenario}' description: "Scenario to deploy with." properties: - logrotate-default @@ -578,29 +494,92 @@ block-level: 'NODE' blocking-jobs: - 'apex-verify.*' - - 'apex-deploy.*' - '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: ALWAYS + condition: SUCCESSFUL projects: - - name: 'apex-deploy-baremetal-{stream}' + - 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 test job +- job-template: + name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}' + + project-type: 'multijob' + + disabled: false + + parameters: + - '{project}-defaults' + - '{project}-baremetal-{scenario_stream}-defaults' + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - string: + name: DEPLOY_SCENARIO + default: '{scenario}' + 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.*' + - 'apex-testsuite-.+-baremetal-.+' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + builders: + - description-setter: + description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" - multijob: name: Functest condition: ALWAYS projects: - - name: 'functest-apex-baremetal-daily-{stream}' + - name: 'functest-apex-baremetal-daily-{scenario_stream}' node-parameters: true current-parameters: false predefined-parameters: @@ -612,14 +591,49 @@ name: Yardstick condition: ALWAYS projects: - - name: 'yardstick-apex-baremetal-daily-{stream}' + - name: 'yardstick-apex-baremetal-daily-{scenario_stream}' + node-parameters: true + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + kill-phase-on: NEVER + abort-all-job: false + git-revision: false + - multijob: + name: Dovetail + condition: ALWAYS + projects: + - 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 @@ -678,7 +692,7 @@ - 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_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER @@ -692,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 @@ -800,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 @@ -826,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 @@ -836,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 @@ -898,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 @@ -913,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 @@ -923,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 ######################## @@ -987,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 @@ -997,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' @@ -1028,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: @@ -1045,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' +