Merge "Run Doctor fault management and maintenance in baremetal"
[releng.git] / jjb / apex / apex.yaml.j2
1 ---
2 - project:
3     name: 'apex'
4     project: 'apex'
5     jobs:
6       - 'apex-fetch-logs-{stream}'
7       - 'apex-runner-cperf-{stream}'
8       - 'apex-virtual-{stream}'
9       - 'apex-deploy-{platform}-{stream}'
10       - 'apex-daily-{stream}'
11       - 'apex-csit-promote-daily-{stream}-os-{os_version}-{topology}'
12       - 'apex-fdio-promote-daily-{stream}'
13       - 'apex-{scenario}-baremetal-{scenario_stream}'
14       - 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
15       - 'apex-upload-snapshot'
16       - 'apex-create-snapshot'
17       - 'apex-fetch-snap-info'
18       - 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}'
19       - 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube'
20     # stream:    branch with - in place of / (eg. stable-arno)
21     # branch:    branch (eg. stable/arno)
22     stream:
23       - master: &master
24           branch: 'master'
25           gs-pathname: ''
26           build-slave: 'apex-build-master'
27           virtual-slave: 'apex-virtual-master'
28           baremetal-slave: 'apex-baremetal-master'
29           verify-scenario: 'os-nosdn-nofeature-noha'
30           scenario_stream: 'master'
31           disable_daily: false
32           disable_promote: false
33       - gambia: &gambia
34           branch: 'stable/gambia'
35           gs-pathname: '/gambia'
36           build-slave: 'apex-build-master'
37           virtual-slave: 'apex-virtual-master'
38           baremetal-slave: 'apex-baremetal-master'
39           verify-scenario: 'os-nosdn-nofeature-ha'
40           scenario_stream: 'gambia'
41           disable_daily: false
42           disable_promote: false
43       - fraser: &fraser
44           branch: 'stable/fraser'
45           gs-pathname: '/fraser'
46           build-slave: 'apex-build-master'
47           virtual-slave: 'apex-virtual-master'
48           baremetal-slave: 'apex-baremetal-master'
49           verify-scenario: 'os-nosdn-nofeature-ha'
50           scenario_stream: 'fraser'
51           disable_daily: false
52           disable_promote: true
53       - euphrates: &euphrates
54           branch: 'stable/euphrates'
55           gs-pathname: '/euphrates'
56           build-slave: 'apex-build-master'
57           virtual-slave: 'apex-virtual-master'
58           baremetal-slave: 'apex-baremetal-master'
59           verify-scenario: 'os-odl-nofeature-ha'
60           scenario_stream: 'euphrates'
61           disable_daily: true
62           disable_promote: true
63       - danube: &danube
64           branch: 'stable/danube'
65           gs-pathname: '/danube'
66           build-slave: 'apex-build-danube'
67           virtual-slave: 'apex-virtual-danube'
68           baremetal-slave: 'apex-baremetal-danube'
69           verify-scenario: 'os-odl_l3-nofeature-ha'
70           scenario_stream: 'danube'
71           disabled: true
72           disable_daily: true
73           disable_promote: true
74
75     scenario:
76       {%- for stream in scenarios %}
77       {%- for scenario in scenarios[stream] %}
78       - '{{scenario}}':
79           <<: *{{stream}}
80       {%- endfor %}
81       {%- endfor %}
82
83     platform:
84       - 'baremetal'
85       - 'virtual'
86
87     os_version:
88       - 'queens':
89           os_scenario: 'nofeature'
90           odl_branch: 'stable/oxygen'
91       - 'rocky':
92           os_scenario: 'rocky'
93           odl_branch: 'stable/oxygen'
94       - 'master':
95           os_scenario: 'nofeature'
96           odl_branch: 'stable/fluorine'
97
98     topology:
99       - 'noha'
100       - 'ha'
101       - 'noha-allinone'
102
103 # Fetch Logs Job
104 - job-template:
105     name: 'apex-fetch-logs-{stream}'
106
107     concurrent: true
108
109     disabled: false
110     scm:
111       - git-scm-gerrit
112     parameters:
113       - project-parameter:
114           project: '{project}'
115           branch: '{branch}'
116       - apex-parameter:
117           gs-pathname: '{gs-pathname}'
118     # yamllint enable rule:line-length
119     properties:
120       - logrotate-default
121       - throttle:
122           max-per-node: 1
123           max-total: 10
124           option: 'project'
125
126     builders:
127       - 'apex-fetch-logs'
128
129 - job-template:
130     name: 'apex-runner-cperf-{stream}'
131
132     # runner cperf job
133     project-type: 'multijob'
134     node: 'intel-pod2'
135
136     disabled: false
137
138     parameters:
139       - apex-parameter:
140           gs-pathname: '{gs-pathname}'
141       - project-parameter:
142           project: '{project}'
143           branch: '{branch}'
144       - string:
145           name: GIT_BASE
146           default: https://gerrit.opnfv.org/gerrit/$PROJECT
147           description: "Used for overriding the GIT URL coming from parameters macro."
148
149     scm:
150       - git-scm
151
152     properties:
153       - logrotate-default
154       - build-blocker:
155           use-build-blocker: false
156           blocking-level: 'NODE'
157           blocking-jobs:
158             - 'apex-deploy.*'
159       - throttle:
160           max-per-node: 1
161           max-total: 10
162           option: 'project'
163
164     builders:
165       - description-setter:
166           description: "Deployed on $NODE_NAME"
167       - multijob:
168           name: 'Baremetal Deploy'
169           condition: ALWAYS
170           projects:
171             - name: 'apex-deploy-baremetal-{stream}'
172               node-parameters: false
173               current-parameters: true
174               predefined-parameters: |
175                 GERRIT_BRANCH=$GERRIT_BRANCH
176                 GERRIT_REFSPEC=
177                 OPNFV_CLEAN=yes
178                 DEPLOY_SCENARIO={verify-scenario}
179               kill-phase-on: FAILURE
180               abort-all-job: true
181               git-revision: false
182       - multijob:
183           name: CPERF
184           condition: SUCCESSFUL
185           projects:
186             - name: 'cperf-apex-intel-pod2-daily-master'
187               node-parameters: true
188               current-parameters: false
189               predefined-parameters:
190                 DEPLOY_SCENARIO={verify-scenario}
191               kill-phase-on: NEVER
192               abort-all-job: false
193               git-revision: false
194
195 # Deploy job
196 - job-template:
197     name: 'apex-deploy-{platform}-{stream}'
198
199     concurrent: true
200
201     disabled: false
202     quiet-period: 30
203     scm:
204       - git-scm-gerrit
205
206     wrappers:
207       - timeout:
208           timeout: 140
209           fail: true
210
211     parameters:
212       - '{project}-{platform}-{stream}-defaults'
213       - project-parameter:
214           project: '{project}'
215           branch: '{branch}'
216       - apex-parameter:
217           gs-pathname: '{gs-pathname}'
218       - string:
219           name: DEPLOY_SCENARIO
220           default: '{verify-scenario}'
221           description: "Scenario to deploy with."
222       # yamllint disable rule:line-length
223       - string:
224           name: OPNFV_CLEAN
225           default: 'no'
226           description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment"
227
228     # yamllint enable rule:line-length
229     properties:
230       - logrotate-default
231       - build-blocker:
232           use-build-blocker: true
233           blocking-level: 'NODE'
234           blocking-jobs:
235             - 'apex-deploy.*'
236             - 'functest.*'
237             - 'yardstick.*'
238             - 'dovetail.*'
239             - 'storperf.*'
240             - 'odl-netvirt.*'
241       - throttle:
242           max-per-node: 1
243           max-total: 10
244           option: 'project'
245
246     builders:
247       - description-setter:
248           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
249       - 'apex-download-artifact'
250       - 'apex-deploy'
251       - 'clean-workspace'
252
253
254 # Virtual Deploy and Test
255 - job-template:
256     name: 'apex-virtual-{stream}'
257
258     project-type: 'multijob'
259
260     concurrent: true
261
262     disabled: false
263
264     scm:
265       - git-scm-gerrit
266
267     parameters:
268       - '{project}-defaults'
269       - '{project}-virtual-{stream}-defaults'
270       - 'functest-suite-parameter'
271       - project-parameter:
272           project: '{project}'
273           branch: '{branch}'
274       - apex-parameter:
275           gs-pathname: '{gs-pathname}'
276       - string:
277           name: DEPLOY_SCENARIO
278           default: '{verify-scenario}'
279           description: "Scenario to deploy with."
280       - string:
281           name: ARTIFACT_VERSION
282           default: dev
283           description: "Used for overriding the ARTIFACT_VERSION"
284
285     properties:
286       - logrotate-default
287       - build-blocker:
288           use-build-blocker: true
289           blocking-level: 'NODE'
290           blocking-jobs:
291             - 'apex-runner.*'
292             - 'apex-run.*'
293             - 'apex-virtual-.*'
294             - 'apex-verify-gate-.*'
295             - 'odl-netvirt.*'
296             - 'apex-.*-promote.*'
297       - throttle:
298           max-per-node: 1
299           max-total: 10
300           option: 'project'
301
302     builders:
303       - description-setter:
304           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
305       - multijob:
306           name: deploy-virtual
307           condition: SUCCESSFUL
308           projects:
309             - name: 'apex-deploy-virtual-{stream}'
310               current-parameters: false
311               predefined-parameters: |
312                 ARTIFACT_VERSION=$ARTIFACT_VERSION
313                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
314                 OPNFV_CLEAN=yes
315                 GERRIT_BRANCH=$GERRIT_BRANCH
316                 GERRIT_REFSPEC=$GERRIT_REFSPEC
317                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
318                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
319                 PROMOTE=$PROMOTE
320               node-parameters: true
321               kill-phase-on: FAILURE
322               abort-all-job: true
323               git-revision: true
324       - multijob:
325           name: functest-smoke
326           condition: ALWAYS
327           projects:
328             - name: 'functest-apex-virtual-suite-{stream}'
329               current-parameters: false
330               predefined-parameters: |
331                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
332                 FUNCTEST_MODE=$FUNCTEST_MODE
333                 FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
334                 GERRIT_BRANCH=$GERRIT_BRANCH
335                 GERRIT_REFSPEC=$GERRIT_REFSPEC
336                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
337                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
338               node-parameters: true
339               kill-phase-on: NEVER
340               abort-all-job: true
341               git-revision: false
342       - multijob:
343           name: apex-fetch-logs
344           projects:
345             - name: 'apex-fetch-logs-{stream}'
346               current-parameters: false
347               predefined-parameters: |
348                 GERRIT_BRANCH=$GERRIT_BRANCH
349                 GERRIT_REFSPEC=$GERRIT_REFSPEC
350                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
351                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
352               node-parameters: true
353               kill-phase-on: NEVER
354               abort-all-job: true
355               git-revision: false
356
357 # Baremetal Deploy and Test
358 - job-template:
359     name: 'apex-{scenario}-baremetal-{scenario_stream}'
360
361     project-type: 'multijob'
362
363     disabled: false
364
365     scm:
366       - git-scm
367
368     parameters:
369       - '{project}-defaults'
370       - '{project}-baremetal-{scenario_stream}-defaults'
371       - project-parameter:
372           project: '{project}'
373           branch: '{branch}'
374       - apex-parameter:
375           gs-pathname: '{gs-pathname}'
376       - string:
377           name: DEPLOY_SCENARIO
378           default: '{scenario}'
379           description: "Scenario to deploy with."
380
381     properties:
382       - logrotate-default
383       - build-blocker:
384           use-build-blocker: true
385           blocking-level: 'NODE'
386           blocking-jobs:
387             - 'apex-verify.*'
388             - 'apex-runner.*'
389             - 'apex-.*-promote.*'
390             - 'apex-run.*'
391             - 'apex-.+-baremetal-.+'
392       - throttle:
393           max-per-node: 1
394           max-total: 10
395           option: 'project'
396
397     builders:
398       - description-setter:
399           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
400       - multijob:
401           name: 'Baremetal Deploy'
402           condition: SUCCESSFUL
403           execution-type: SEQUENTIALLY
404           projects:
405             - name: 'apex-deploy-baremetal-{scenario_stream}'
406               node-parameters: true
407               current-parameters: true
408               predefined-parameters: |
409                 OPNFV_CLEAN=yes
410                 GERRIT_BRANCH=$GERRIT_BRANCH
411                 GERRIT_REFSPEC=
412                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
413               kill-phase-on: NEVER
414               abort-all-job: true
415               git-revision: false
416             - name: 'apex-fetch-logs-{scenario_stream}'
417               current-parameters: true
418               predefined-parameters: |
419                 GERRIT_BRANCH=$GERRIT_BRANCH
420                 GERRIT_REFSPEC=
421               node-parameters: true
422               kill-phase-on: NEVER
423               abort-all-job: true
424               git-revision: false
425       - shell: |
426           features=$(echo $DEPLOY_SCENARIO | sed -r -n 's/os-.+-(.+)-(noha|ha)/\1/p')
427           if [ "$features" == 'rocky' ]; then
428             functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-rocky-(noha|ha)/\1-nofeature-\2/p')
429             echo "DOCKER_TAG=hunter" > functest_scenario
430           elif [[ "$features" =~ 'rocky' ]]; then
431             functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-(.+)_rocky-(noha|ha)/\1-\2-\3/p')
432             echo "DOCKER_TAG=hunter" > functest_scenario
433           else
434             functest_scenario=$DEPLOY_SCENARIO
435             echo "DOCKER_TAG=''" > functest_scenario
436           fi
437           echo "DEPLOY_SCENARIO=$functest_scenario" >> functest_scenario
438       - inject:
439           properties-file: functest_scenario
440           override-build-parameters: true
441       - multijob:
442           name: 'OPNFV Test Suite'
443           condition: ALWAYS
444           projects:
445             - name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
446               node-parameters: true
447               current-parameters: false
448               predefined-parameters: |
449                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
450                 DOCKER_TAG=$DOCKER_TAG
451               kill-phase-on: NEVER
452               abort-all-job: true
453               git-revision: false
454       - multijob:
455           name: apex-fetch-logs
456           projects:
457             - name: 'apex-fetch-logs-{scenario_stream}'
458               current-parameters: true
459               predefined-parameters: |
460                 GERRIT_BRANCH=$GERRIT_BRANCH
461                 GERRIT_REFSPEC=
462               node-parameters: true
463               kill-phase-on: NEVER
464               abort-all-job: true
465               git-revision: false
466     publishers:
467       - groovy-postbuild:
468           script:
469             !include-raw-escape: ./update-build-result.groovy
470
471 # Baremetal test job
472 - job-template:
473     name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
474
475     project-type: 'multijob'
476
477     disabled: false
478
479     parameters:
480       - '{project}-defaults'
481       - '{project}-baremetal-{scenario_stream}-defaults'
482       - project-parameter:
483           project: '{project}'
484           branch: '{branch}'
485       - apex-parameter:
486           gs-pathname: '{gs-pathname}'
487       - string:
488           name: DEPLOY_SCENARIO
489           default: '{scenario}'
490           description: "Scenario to deploy with."
491       - string:
492           name: DOCKER_TAG
493           default: ''
494           description: Default docker tag to pass to functest
495
496     properties:
497       - logrotate-default
498       - build-blocker:
499           use-build-blocker: true
500           blocking-level: 'NODE'
501           blocking-jobs:
502             - 'apex-verify.*'
503             - 'apex-runner.*'
504             - 'apex-run.*'
505             - 'apex-testsuite-.+-baremetal-.+'
506       - throttle:
507           max-per-node: 1
508           max-total: 10
509           option: 'project'
510
511     builders:
512       - description-setter:
513           description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
514       - multijob:
515           name: Functest
516           condition: ALWAYS
517           projects:
518             - name: 'functest-apex-baremetal-daily-{scenario_stream}'
519               node-parameters: true
520               current-parameters: false
521               predefined-parameters:
522                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
523                 DOCKER_TAG=$DOCKER_TAG
524               kill-phase-on: NEVER
525               abort-all-job: false
526               git-revision: false
527       - multijob:
528           name: Yardstick
529           condition: ALWAYS
530           projects:
531             - name: 'yardstick-apex-baremetal-daily-{scenario_stream}'
532               node-parameters: true
533               current-parameters: false
534               predefined-parameters:
535                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
536               kill-phase-on: NEVER
537               abort-all-job: false
538               git-revision: false
539       - multijob:
540           name: Dovetail-proposed_tests
541           condition: ALWAYS
542           projects:
543             - name: 'dovetail-apex-baremetal-default-mandatory-{scenario_stream}'
544               node-parameters: true
545               current-parameters: false
546               predefined-parameters:
547                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
548               kill-phase-on: NEVER
549               enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/"
550               abort-all-job: false
551               git-revision: false
552       - multijob:
553           name: Dovetail-default
554           condition: ALWAYS
555           projects:
556             - name: 'dovetail-apex-baremetal-default-optional-{scenario_stream}'
557               node-parameters: true
558               current-parameters: false
559               predefined-parameters:
560                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
561               kill-phase-on: NEVER
562               enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/"
563               abort-all-job: false
564               git-revision: false
565       - multijob:
566           name: StorPerf
567           condition: ALWAYS
568           projects:
569             - name: 'storperf-apex-baremetal-daily-{scenario_stream}'
570               node-parameters: true
571               current-parameters: false
572               predefined-parameters:
573                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
574               enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-nosdn-nofeature-ha/"
575               kill-phase-on: NEVER
576               abort-all-job: false
577               git-revision: false
578 # Build status is always success due conditional plugin prefetching
579 # build status before multijob phases execute
580 #        - conditional-step:
581 #            condition-kind: current-status
582 #            condition-worst: SUCCESS
583 #            condtion-best: SUCCESS
584 #            on-evaluation-failure: mark-unstable
585 #            steps:
586 #                - shell: 'echo "Tests Passed"'
587
588 - job-template:
589     name: 'apex-daily-{stream}'
590
591     # Job template for daily build
592     #
593     # Required Variables:
594     #     stream:    branch with - in place of / (eg. stable)
595     #     branch:    branch (eg. stable)
596     project-type: 'multijob'
597
598     disabled: '{obj:disable_daily}'
599
600     scm:
601       - git-scm
602
603     parameters:
604       - '{project}-defaults'
605       - '{project}-baremetal-{stream}-defaults'
606       - project-parameter:
607           project: '{project}'
608           branch: '{branch}'
609       - apex-parameter:
610           gs-pathname: '{gs-pathname}'
611
612     properties:
613       - logrotate-default
614       - build-blocker:
615           use-build-blocker: true
616           blocking-level: 'NODE'
617           blocking-jobs:
618             - 'apex-daily.*'
619
620     triggers:
621       - 'apex-{stream}'
622
623     builders:
624       - multijob:
625           name: build
626           condition: SUCCESSFUL
627           projects:
628             - name: 'apex-build-{stream}'
629               current-parameters: false
630               predefined-parameters: |
631                 GERRIT_BRANCH=$GERRIT_BRANCH
632                 GERRIT_REFSPEC=
633                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
634                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
635               node-parameters: true
636               kill-phase-on: FAILURE
637               abort-all-job: true
638               git-revision: true
639       - multijob:
640           name: 'Verify and upload ISO'
641           condition: SUCCESSFUL
642           projects:
643             - name: 'apex-verify-iso-{stream}'
644               current-parameters: false
645               predefined-parameters: |
646                 BUILD_DIRECTORY=$WORKSPACE/../apex-build-{stream}/.build
647                 GERRIT_BRANCH=$GERRIT_BRANCH
648                 GERRIT_REFSPEC=
649                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
650                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
651               node-parameters: true
652               kill-phase-on: FAILURE
653               abort-all-job: true
654               git-revision: true
655       - apex-builder-{stream}
656
657 # snapshot info fetch
658 - job-template:
659     name: 'apex-fetch-snap-info'
660
661     disabled: false
662
663     parameters:
664       - '{project}-defaults'
665
666     builders:
667       - shell:
668           !include-raw-escape: ./apex-fetch-snap-info.sh
669
670 # snapshot create
671 - job-template:
672     name: 'apex-create-snapshot'
673
674     disabled: false
675
676     parameters:
677       - '{project}-defaults'
678
679     builders:
680       - shell:
681           !include-raw-escape: ./apex-snapshot-create.sh
682
683 # snapshot upload
684 - job-template:
685     name: 'apex-upload-snapshot'
686
687     disabled: false
688
689     parameters:
690       - '{project}-defaults'
691
692     builders:
693       - inject:
694           properties-content: ARTIFACT_TYPE=snapshot
695       - 'apex-upload-artifact'
696
697 # CSIT promote
698 - job-template:
699     name: 'apex-csit-promote-daily-{stream}-os-{os_version}-{topology}'
700
701     # Job template for promoting CSIT Snapshots
702     #
703     # Required Variables:
704     #     stream:    branch with - in place of / (eg. stable)
705     #     branch:    branch (eg. stable)
706     node: '{virtual-slave}'
707     project-type: 'multijob'
708     disabled: '{disable_promote}'
709
710     scm:
711       - git-scm
712
713     parameters:
714       - project-parameter:
715           project: '{project}'
716           branch: '{branch}'
717       - apex-parameter:
718           gs-pathname: '{gs-pathname}'
719       - string:
720           name: ARTIFACT_VERSION
721           default: dev
722           description: "Used for overriding the ARTIFACT_VERSION"
723       - string:
724           name: PROMOTE
725           default: 'True'
726           description: "Used for overriding the PROMOTE"
727       - string:
728           name: GS_URL
729           default: 'artifacts.opnfv.org/apex/{os_version}/{topology}'
730           description: "User for overriding GS_URL from apex params"
731       - string:
732           name: OS_VERSION
733           default: '{os_version}'
734           description: OpenStack version short name
735       - string:
736           name: ODL_BRANCH
737           default: '{odl_branch}'
738           description: ODL branch being used
739       - string:
740           name: FORCE_PROMOTE
741           default: 'False'
742           description: "Used to force promotion and skip CSIT"
743     properties:
744       - build-blocker:
745           use-build-blocker: true
746           blocking-level: 'NODE'
747           blocking-jobs:
748             - 'apex-verify.*'
749             - 'apex-runner.*'
750             - 'apex-daily.*'
751             - 'apex-csit-promote.*'
752             - 'odl-netvirt.*'
753       - throttle:
754           max-per-node: 1
755           max-total: 10
756           option: 'project'
757
758     triggers:
759       - '{stream}-{os_version}'
760
761     builders:
762       - multijob:
763           name: apex-virtual-deploy
764           condition: SUCCESSFUL
765           projects:
766             - name: 'apex-deploy-virtual-{stream}'
767               current-parameters: true
768               predefined-parameters: |
769                 DEPLOY_SCENARIO=os-odl-{os_scenario}-{topology}
770                 OPNFV_CLEAN=yes
771                 GERRIT_BRANCH=$GERRIT_BRANCH
772                 GERRIT_REFSPEC=$GERRIT_REFSPEC
773                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
774                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
775               node-parameters: true
776               kill-phase-on: FAILURE
777               abort-all-job: true
778               git-revision: true
779       - multijob:
780           name: fetch snapshot info
781           condition: SUCCESSFUL
782           projects:
783             - name: 'apex-fetch-snap-info'
784               current-parameters: true
785               node-parameters: true
786               kill-phase-on: FAILURE
787               abort-all-job: true
788               git-revision: false
789       - multijob:
790           name: csit
791           condition: SUCCESSFUL
792           execution-type: SEQUENTIALLY
793           projects:
794             - name: cperf-apex-csit-master
795               predefined-parameters: |
796                 ODL_BRANCH=$ODL_BRANCH
797                 RC_FILE_PATH=/tmp/csit/overcloudrc
798                 NODE_FILE_PATH=/tmp/csit/node.yaml
799                 SSH_KEY_PATH=/tmp/csit/id_rsa
800                 ODL_CONTAINERIZED=true
801                 OS_VERSION=$OS_VERSION
802                 SKIP_CSIT=$FORCE_PROMOTE
803               node-parameters: true
804               kill-phase-on: NEVER
805               abort-all-job: false
806             - name: cperf-upload-logs-csit
807               predefined-parameters: |
808                 ODL_BRANCH=$ODL_BRANCH
809                 OS_VERSION=$OS_VERSION
810               node-parameters: true
811               kill-phase-on: FAILURE
812               abort-all-job: false
813             - name: 'apex-fetch-logs-{stream}'
814               current-parameters: false
815               predefined-parameters: |
816                 GERRIT_BRANCH=$GERRIT_BRANCH
817                 GERRIT_REFSPEC=$GERRIT_REFSPEC
818                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
819                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
820               node-parameters: true
821               kill-phase-on: NEVER
822               abort-all-job: true
823               git-revision: false
824       - multijob:
825           name: create snapshot
826           condition: SUCCESSFUL
827           projects:
828             - name: 'apex-create-snapshot'
829               current-parameters: true
830               predefined-parameters: |
831                 SNAP_TYPE=csit
832               node-parameters: true
833               kill-phase-on: FAILURE
834               abort-all-job: true
835               git-revision: false
836       - multijob:
837           name: upload snapshot
838           condition: SUCCESSFUL
839           projects:
840             - name: 'apex-upload-snapshot'
841               current-parameters: true
842               predefined-parameters: |
843                 SNAP_TYPE=csit
844               node-parameters: true
845               kill-phase-on: FAILURE
846               abort-all-job: true
847               git-revision: false
848
849 # FDIO promote
850 - job-template:
851     name: 'apex-fdio-promote-daily-{stream}'
852
853     # Job template for promoting CSIT Snapshots
854     #
855     # Required Variables:
856     #     stream:    branch with - in place of / (eg. stable)
857     #     branch:    branch (eg. stable)
858     node: '{virtual-slave}'
859     project-type: 'multijob'
860     disabled: false
861
862     scm:
863       - git-scm
864
865     parameters:
866       - project-parameter:
867           project: '{project}'
868           branch: '{branch}'
869       - apex-parameter:
870           gs-pathname: '{gs-pathname}'
871
872     properties:
873       - build-blocker:
874           use-build-blocker: true
875           blocking-level: 'NODE'
876           blocking-jobs:
877             - 'apex-verify.*'
878             - 'apex-deploy.*'
879             - 'apex-runner.*'
880             - 'apex-daily.*'
881
882     builders:
883       - multijob:
884           name: build
885           condition: SUCCESSFUL
886           projects:
887             - name: 'apex-build-{stream}'
888               current-parameters: false
889               predefined-parameters: |
890                 GERRIT_BRANCH=$GERRIT_BRANCH
891                 GERRIT_REFSPEC=$GERRIT_REFSPEC
892                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
893                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
894               node-parameters: false
895               kill-phase-on: FAILURE
896               abort-all-job: true
897               git-revision: true
898       - multijob:
899           name: deploy-virtual
900           condition: SUCCESSFUL
901           projects:
902             - name: 'apex-deploy-virtual-{stream}'
903               current-parameters: false
904               predefined-parameters: |
905                 DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha
906                 OPNFV_CLEAN=yes
907                 GERRIT_BRANCH=$GERRIT_BRANCH
908                 GERRIT_REFSPEC=$GERRIT_REFSPEC
909                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
910                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
911                 PROMOTE=True
912               node-parameters: true
913               kill-phase-on: FAILURE
914               abort-all-job: true
915               git-revision: false
916       - multijob:
917           name: create snapshot
918           condition: SUCCESSFUL
919           projects:
920             - name: 'apex-create-snapshot'
921               current-parameters: false
922               predefined-parameters: |
923                 SNAP_TYPE=fdio
924               node-parameters: true
925               kill-phase-on: FAILURE
926               abort-all-job: true
927               git-revision: false
928       - multijob:
929           name: upload snapshot
930           condition: SUCCESSFUL
931           projects:
932             - name: 'apex-upload-snapshot'
933               current-parameters: false
934               predefined-parameters: |
935                 SNAP_TYPE=fdio
936               node-parameters: true
937               kill-phase-on: FAILURE
938               abort-all-job: true
939               git-revision: false
940
941 # Flex job
942 - job-template:
943     name: 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}'
944
945     project-type: 'multijob'
946
947     disabled: false
948
949     node: 'flex-pod2'
950
951     scm:
952       - git-scm
953
954     triggers:
955       - 'apex-{stream}'
956
957     parameters:
958       - '{project}-defaults'
959       - project-parameter:
960           project: '{project}'
961           branch: '{branch}'
962       - apex-parameter:
963           gs-pathname: '{gs-pathname}'
964       - string:
965           name: DEPLOY_SCENARIO
966           default: 'os-nosdn-nofeature-ha'
967           description: "Scenario to deploy with."
968       - string:
969           name: GIT_BASE
970           default: https://gerrit.opnfv.org/gerrit/$PROJECT
971           description: 'Git URL to use on this Jenkins Slave'
972       - string:
973           name: SSH_KEY
974           default: /root/.ssh/id_rsa
975           description: 'SSH key to use for Apex'
976
977     properties:
978       - logrotate-default
979       - build-blocker:
980           use-build-blocker: true
981           blocking-level: 'NODE'
982           blocking-jobs:
983             - 'apex-verify.*'
984             - 'apex-runner.*'
985             - 'apex-.*-promote.*'
986             - 'apex-run.*'
987             - 'apex-.+-baremetal-.+'
988       - throttle:
989           max-per-node: 1
990           max-total: 10
991           option: 'project'
992
993     builders:
994       - description-setter:
995           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
996       - multijob:
997           name: 'Baremetal Deploy'
998           condition: SUCCESSFUL
999           projects:
1000             - name: 'apex-deploy-baremetal-{stream}'
1001               node-parameters: true
1002               current-parameters: true
1003               predefined-parameters: |
1004                 OPNFV_CLEAN=yes
1005                 GERRIT_BRANCH=$GERRIT_BRANCH
1006                 GERRIT_REFSPEC=
1007                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
1008               kill-phase-on: FAILURE
1009               abort-all-job: true
1010               git-revision: false
1011       - multijob:
1012           name: Yardstick
1013           condition: ALWAYS
1014           projects:
1015             - name: 'yardstick-apex-baremetal-daily-{stream}'
1016               node-parameters: true
1017               current-parameters: false
1018               predefined-parameters:
1019                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
1020               kill-phase-on: NEVER
1021               abort-all-job: false
1022               git-revision: false
1023
1024 # Dovetail Danube test job
1025 - job-template:
1026     name: 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube'
1027
1028     project-type: 'multijob'
1029
1030     node: 'huawei-pod4'
1031
1032     disabled: false
1033
1034     parameters:
1035       - '{project}-defaults'
1036       - project-parameter:
1037           project: '{project}'
1038           branch: 'stable/danube'
1039       - apex-parameter:
1040           gs-pathname: '/danube'
1041       - string:
1042           name: DEPLOY_SCENARIO
1043           default: 'os-nosdn-nofeature-ha'
1044           description: "Scenario to deploy with."
1045
1046     properties:
1047       - logrotate-default
1048       - build-blocker:
1049           use-build-blocker: true
1050           blocking-level: 'NODE'
1051           blocking-jobs:
1052             - 'apex-verify.*'
1053             - 'apex-runner.*'
1054             - 'apex-.*-promote.*'
1055             - 'apex-run.*'
1056
1057     triggers:
1058       - timed: ''  # '0 1 * * *'
1059
1060     builders:
1061       - description-setter:
1062           description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
1063       - multijob:
1064           name: 'Baremetal Deploy'
1065           condition: SUCCESSFUL
1066           projects:
1067             - name: 'apex-deploy-baremetal-danube'
1068               node-parameters: true
1069               current-parameters: true
1070               predefined-parameters: |
1071                 OPNFV_CLEAN=yes
1072                 GERRIT_BRANCH=$GERRIT_BRANCH
1073                 GERRIT_REFSPEC=
1074                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
1075               kill-phase-on: FAILURE
1076               abort-all-job: true
1077               git-revision: false
1078       - multijob:
1079           name: Dovetail
1080           condition: ALWAYS
1081           projects:
1082             - name: 'dovetail-apex-baremetal-proposed_tests-danube'
1083               node-parameters: true
1084               current-parameters: false
1085               predefined-parameters:
1086                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
1087               kill-phase-on: NEVER
1088               abort-all-job: false
1089               git-revision: false
1090
1091 ########################
1092 # parameter macros
1093 ########################
1094 - parameter:
1095     name: apex-parameter
1096     parameters:
1097       - string:
1098           name: ARTIFACT_NAME
1099           default: 'latest'
1100           description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
1101       - string:
1102           name: ARTIFACT_VERSION
1103           default: 'daily'
1104           description: "Artifact version type"
1105       - string:
1106           name: BUILD_DIRECTORY
1107           default: $WORKSPACE/.build
1108           description: "Directory where the build artifact will be located upon the completion of the build."
1109       - string:
1110           name: CACHE_DIRECTORY
1111           default: $HOME/opnfv/apex-cache{gs-pathname}
1112           description: "Directory where the cache to be used during the build is located."
1113       # yamllint disable rule:line-length
1114       - string:
1115           name: GIT_BASE
1116           default: https://gerrit.opnfv.org/gerrit/$PROJECT
1117           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
1118       # yamllint enable rule:line-length
1119       - string:
1120           name: GS_PATHNAME
1121           default: '{gs-pathname}'
1122           description: "Version directory where opnfv artifacts are stored in gs repository"
1123       - string:
1124           name: GS_URL
1125           default: $GS_BASE{gs-pathname}
1126           description: "URL to Google Storage."
1127       - string:
1128           name: PROMOTE
1129           default: 'False'
1130           description: "Flag to know if we should promote/upload snapshot artifacts."
1131
1132 ########################
1133 # builder macros
1134 ########################
1135 {% for stream in scenarios %}
1136 # {{ stream }} Builder
1137 - builder:
1138     name: apex-builder-{{ stream }}
1139     builders:
1140       - multijob:
1141           name: Baremetal Deploy and Test Phase
1142           condition: SUCCESSFUL
1143           projects:
1144 {%- for scenario in scenarios[stream] %}
1145             - name: 'apex-{{ scenario }}-baremetal-{{ stream }}'
1146               node-parameters: false
1147               current-parameters: false
1148               predefined-parameters: |
1149                 OPNFV_CLEAN=yes
1150               kill-phase-on: NEVER
1151               abort-all-job: true
1152               git-revision: false
1153 {%- endfor %}
1154 {% endfor -%}
1155
1156 - builder:
1157     name: 'apex-upload-artifact'
1158     builders:
1159       - shell:
1160           !include-raw: ./apex-upload-artifact.sh
1161
1162 - builder:
1163     name: 'apex-download-artifact'
1164     builders:
1165       - shell:
1166           !include-raw: ./apex-download-artifact.sh
1167
1168 - builder:
1169     name: 'apex-deploy'
1170     builders:
1171       - shell:
1172           !include-raw: ./apex-deploy.sh
1173
1174 - builder:
1175     name: 'apex-fetch-logs'
1176     builders:
1177       - shell:
1178           !include-raw: ./apex-fetch-logs.sh
1179
1180 #######################
1181 # trigger macros
1182 # timed is in format: 'min hour daymonth month dayweek'
1183 ########################
1184 - trigger:
1185     name: 'apex-master'
1186     triggers:
1187       - timed: '0 0 1-31/2 * *'
1188
1189 - trigger:
1190     name: 'apex-gambia'
1191     triggers:
1192       - timed: '0 4 2-30/2 * *'
1193
1194 - trigger:
1195     name: 'apex-fraser'
1196     triggers:
1197       - timed: '0 0 2-30/2 * *'
1198
1199 - trigger:
1200     name: 'apex-euphrates'
1201     triggers:
1202       - timed: '0 0 2-30/2 * *'
1203
1204 - trigger:
1205     name: 'apex-danube'
1206     triggers:
1207       - timed: '0 3 1 1 7'
1208
1209 - trigger:
1210     name: 'master-master'
1211     triggers:
1212       - timed: '0 5 * * *'
1213
1214 - trigger:
1215     name: 'master-rocky'
1216     triggers:
1217       - timed: '0 5 * * *'
1218
1219 - trigger:
1220     name: 'master-queens'
1221     triggers:
1222       - timed: ''
1223
1224 - trigger:
1225     name: 'gambia-master'
1226     triggers:
1227       - timed: ''
1228
1229 - trigger:
1230     name: 'gambia-rocky'
1231     triggers:
1232       - timed: ''
1233
1234 - trigger:
1235     name: 'gambia-queens'
1236     triggers:
1237       - timed: '0 5 * * *'
1238
1239 - trigger:
1240     name: 'fraser-master'
1241     triggers:
1242       - timed: ''
1243
1244 - trigger:
1245     name: 'fraser-rocky'
1246     triggers:
1247       - timed: ''
1248
1249 - trigger:
1250     name: 'fraser-queens'
1251     triggers:
1252       - timed: ''
1253
1254 - trigger:
1255     name: 'euphrates-master'
1256     triggers:
1257       - timed: ''
1258
1259 - trigger:
1260     name: 'euphrates-rocky'
1261     triggers:
1262       - timed: ''
1263
1264 - trigger:
1265     name: 'euphrates-queens'
1266     triggers:
1267       - timed: ''
1268
1269 - trigger:
1270     name: 'danube-master'
1271     triggers:
1272       - timed: ''
1273
1274 - trigger:
1275     name: 'danube-rocky'
1276     triggers:
1277       - timed: ''
1278
1279 - trigger:
1280     name: 'danube-queens'
1281     triggers:
1282       - timed: ''