Revert "Apex: Enable OS master clients with Tempest"
[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           if echo $DEPLOY_SCENARIO | grep queens &> /dev/null; then
427             echo 'REPO=opnfv' > functest_properties
428           else
429             echo 'REPO=ollivier' > functest_properties
430           fi
431           features=$(echo $DEPLOY_SCENARIO | sed -r -n 's/os-.+-(.+)-(noha|ha)/\1/p')
432           if [ "$features" == 'queens' ]; then
433             functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-queens-(noha|ha)/\1-nofeature-\2/p')
434           elif [[ "$features" =~ 'queens' ]]; then
435             functest_scenario=$(echo $DEPLOY_SCENARIO | sed -r -n 's/(os-.+?)-(.+)_queens-(noha|ha)/\1-\2-\3/p')
436           else
437             functest_scenario=$DEPLOY_SCENARIO
438           fi
439           echo "DEPLOY_SCENARIO=$functest_scenario" >> functest_properties
440       - inject:
441           properties-file: functest_properties
442           override-build-parameters: true
443       - multijob:
444           name: 'OPNFV Test Suite'
445           condition: ALWAYS
446           projects:
447             - name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
448               node-parameters: true
449               current-parameters: false
450               predefined-parameters:
451                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
452               kill-phase-on: NEVER
453               abort-all-job: true
454               git-revision: false
455       - multijob:
456           name: apex-fetch-logs
457           projects:
458             - name: 'apex-fetch-logs-{scenario_stream}'
459               current-parameters: true
460               predefined-parameters: |
461                 GERRIT_BRANCH=$GERRIT_BRANCH
462                 GERRIT_REFSPEC=
463               node-parameters: true
464               kill-phase-on: NEVER
465               abort-all-job: true
466               git-revision: false
467     publishers:
468       - groovy-postbuild:
469           script:
470             !include-raw-escape: ./update-build-result.groovy
471
472 # Baremetal test job
473 - job-template:
474     name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
475
476     project-type: 'multijob'
477
478     disabled: false
479
480     parameters:
481       - '{project}-defaults'
482       - '{project}-baremetal-{scenario_stream}-defaults'
483       - project-parameter:
484           project: '{project}'
485           branch: '{branch}'
486       - apex-parameter:
487           gs-pathname: '{gs-pathname}'
488       - string:
489           name: DEPLOY_SCENARIO
490           default: '{scenario}'
491           description: "Scenario to deploy with."
492
493     properties:
494       - logrotate-default
495       - build-blocker:
496           use-build-blocker: true
497           blocking-level: 'NODE'
498           blocking-jobs:
499             - 'apex-verify.*'
500             - 'apex-runner.*'
501             - 'apex-run.*'
502             - 'apex-testsuite-.+-baremetal-.+'
503       - throttle:
504           max-per-node: 1
505           max-total: 10
506           option: 'project'
507
508     builders:
509       - description-setter:
510           description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
511       - multijob:
512           name: Functest
513           condition: ALWAYS
514           projects:
515             - name: 'functest-apex-baremetal-daily-{scenario_stream}'
516               node-parameters: true
517               current-parameters: false
518               predefined-parameters:
519                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
520               kill-phase-on: NEVER
521               abort-all-job: false
522               git-revision: false
523       - multijob:
524           name: Yardstick
525           condition: ALWAYS
526           projects:
527             - name: 'yardstick-apex-baremetal-daily-{scenario_stream}'
528               node-parameters: true
529               current-parameters: false
530               predefined-parameters:
531                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
532               kill-phase-on: NEVER
533               abort-all-job: false
534               git-revision: false
535       - multijob:
536           name: Dovetail-proposed_tests
537           condition: ALWAYS
538           projects:
539             - name: 'dovetail-apex-baremetal-default-mandatory-{scenario_stream}'
540               node-parameters: true
541               current-parameters: false
542               predefined-parameters:
543                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
544               kill-phase-on: NEVER
545               enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/"
546               abort-all-job: false
547               git-revision: false
548       - multijob:
549           name: Dovetail-default
550           condition: ALWAYS
551           projects:
552             - name: 'dovetail-apex-baremetal-default-optional-{scenario_stream}'
553               node-parameters: true
554               current-parameters: false
555               predefined-parameters:
556                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
557               kill-phase-on: NEVER
558               enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/"
559               abort-all-job: false
560               git-revision: false
561       - multijob:
562           name: StorPerf
563           condition: ALWAYS
564           projects:
565             - name: 'storperf-apex-baremetal-daily-{scenario_stream}'
566               node-parameters: true
567               current-parameters: false
568               predefined-parameters:
569                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
570               enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-nosdn-nofeature-ha/"
571               kill-phase-on: NEVER
572               abort-all-job: false
573               git-revision: false
574 # Build status is always success due conditional plugin prefetching
575 # build status before multijob phases execute
576 #        - conditional-step:
577 #            condition-kind: current-status
578 #            condition-worst: SUCCESS
579 #            condtion-best: SUCCESS
580 #            on-evaluation-failure: mark-unstable
581 #            steps:
582 #                - shell: 'echo "Tests Passed"'
583
584 - job-template:
585     name: 'apex-daily-{stream}'
586
587     # Job template for daily build
588     #
589     # Required Variables:
590     #     stream:    branch with - in place of / (eg. stable)
591     #     branch:    branch (eg. stable)
592     project-type: 'multijob'
593
594     disabled: '{obj:disable_daily}'
595
596     scm:
597       - git-scm
598
599     parameters:
600       - '{project}-defaults'
601       - '{project}-baremetal-{stream}-defaults'
602       - project-parameter:
603           project: '{project}'
604           branch: '{branch}'
605       - apex-parameter:
606           gs-pathname: '{gs-pathname}'
607
608     properties:
609       - logrotate-default
610       - build-blocker:
611           use-build-blocker: true
612           blocking-level: 'NODE'
613           blocking-jobs:
614             - 'apex-daily.*'
615
616     triggers:
617       - 'apex-{stream}'
618
619     builders:
620       - multijob:
621           name: build
622           condition: SUCCESSFUL
623           projects:
624             - name: 'apex-build-{stream}'
625               current-parameters: false
626               predefined-parameters: |
627                 GERRIT_BRANCH=$GERRIT_BRANCH
628                 GERRIT_REFSPEC=
629                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
630                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
631               node-parameters: true
632               kill-phase-on: FAILURE
633               abort-all-job: true
634               git-revision: true
635       - multijob:
636           name: 'Verify and upload ISO'
637           condition: SUCCESSFUL
638           projects:
639             - name: 'apex-verify-iso-{stream}'
640               current-parameters: false
641               predefined-parameters: |
642                 BUILD_DIRECTORY=$WORKSPACE/../apex-build-{stream}/.build
643                 GERRIT_BRANCH=$GERRIT_BRANCH
644                 GERRIT_REFSPEC=
645                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
646                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
647               node-parameters: true
648               kill-phase-on: FAILURE
649               abort-all-job: true
650               git-revision: true
651       - apex-builder-{stream}
652
653 # snapshot info fetch
654 - job-template:
655     name: 'apex-fetch-snap-info'
656
657     disabled: false
658
659     parameters:
660       - '{project}-defaults'
661
662     builders:
663       - shell:
664           !include-raw-escape: ./apex-fetch-snap-info.sh
665
666 # snapshot create
667 - job-template:
668     name: 'apex-create-snapshot'
669
670     disabled: false
671
672     parameters:
673       - '{project}-defaults'
674
675     builders:
676       - shell:
677           !include-raw-escape: ./apex-snapshot-create.sh
678
679 # snapshot upload
680 - job-template:
681     name: 'apex-upload-snapshot'
682
683     disabled: false
684
685     parameters:
686       - '{project}-defaults'
687
688     builders:
689       - inject:
690           properties-content: ARTIFACT_TYPE=snapshot
691       - 'apex-upload-artifact'
692
693 # CSIT promote
694 - job-template:
695     name: 'apex-csit-promote-daily-{stream}-os-{os_version}-{topology}'
696
697     # Job template for promoting CSIT Snapshots
698     #
699     # Required Variables:
700     #     stream:    branch with - in place of / (eg. stable)
701     #     branch:    branch (eg. stable)
702     node: '{virtual-slave}'
703     project-type: 'multijob'
704     disabled: '{disable_promote}'
705
706     scm:
707       - git-scm
708
709     parameters:
710       - project-parameter:
711           project: '{project}'
712           branch: '{branch}'
713       - apex-parameter:
714           gs-pathname: '{gs-pathname}'
715       - string:
716           name: ARTIFACT_VERSION
717           default: dev
718           description: "Used for overriding the ARTIFACT_VERSION"
719       - string:
720           name: PROMOTE
721           default: 'True'
722           description: "Used for overriding the PROMOTE"
723       - string:
724           name: GS_URL
725           default: 'gs://artifacts.opnfv.org/apex/{os_version}/{topology}'
726           description: "User for overriding GS_URL from apex params"
727       - string:
728           name: OS_VERSION
729           default: '{os_version}'
730           description: OpenStack version short name
731       - string:
732           name: ODL_BRANCH
733           default: '{odl_branch}'
734           description: ODL branch being used
735       - string:
736           name: FORCE_PROMOTE
737           default: 'False'
738           description: "Used to force promotion and skip CSIT"
739     properties:
740       - build-blocker:
741           use-build-blocker: true
742           blocking-level: 'NODE'
743           blocking-jobs:
744             - 'apex-verify.*'
745             - 'apex-runner.*'
746             - 'apex-daily.*'
747             - 'apex-csit-promote.*'
748             - 'odl-netvirt.*'
749       - throttle:
750           max-per-node: 1
751           max-total: 10
752           option: 'project'
753
754     triggers:
755       - '{stream}-{os_version}'
756
757     builders:
758       - multijob:
759           name: apex-virtual-deploy
760           condition: SUCCESSFUL
761           projects:
762             - name: 'apex-deploy-virtual-{stream}'
763               current-parameters: true
764               predefined-parameters: |
765                 DEPLOY_SCENARIO=os-odl-{os_scenario}-{topology}
766                 OPNFV_CLEAN=yes
767                 GERRIT_BRANCH=$GERRIT_BRANCH
768                 GERRIT_REFSPEC=$GERRIT_REFSPEC
769                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
770                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
771               node-parameters: true
772               kill-phase-on: FAILURE
773               abort-all-job: true
774               git-revision: true
775       - multijob:
776           name: fetch snapshot info
777           condition: SUCCESSFUL
778           projects:
779             - name: 'apex-fetch-snap-info'
780               current-parameters: true
781               node-parameters: true
782               kill-phase-on: FAILURE
783               abort-all-job: true
784               git-revision: false
785       - multijob:
786           name: csit
787           condition: SUCCESSFUL
788           execution-type: SEQUENTIALLY
789           projects:
790             - name: cperf-apex-csit-master
791               predefined-parameters: |
792                 ODL_BRANCH=$ODL_BRANCH
793                 RC_FILE_PATH=/tmp/csit/overcloudrc
794                 NODE_FILE_PATH=/tmp/csit/node.yaml
795                 SSH_KEY_PATH=/tmp/csit/id_rsa
796                 ODL_CONTAINERIZED=true
797                 OS_VERSION=$OS_VERSION
798                 SKIP_CSIT=$FORCE_PROMOTE
799               node-parameters: true
800               kill-phase-on: NEVER
801               abort-all-job: false
802             - name: cperf-upload-logs-csit
803               predefined-parameters: |
804                 ODL_BRANCH=$ODL_BRANCH
805                 OS_VERSION=$OS_VERSION
806               node-parameters: true
807               kill-phase-on: FAILURE
808               abort-all-job: false
809             - name: 'apex-fetch-logs-{stream}'
810               current-parameters: false
811               predefined-parameters: |
812                 GERRIT_BRANCH=$GERRIT_BRANCH
813                 GERRIT_REFSPEC=$GERRIT_REFSPEC
814                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
815                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
816               node-parameters: true
817               kill-phase-on: NEVER
818               abort-all-job: true
819               git-revision: false
820       - multijob:
821           name: create snapshot
822           condition: SUCCESSFUL
823           projects:
824             - name: 'apex-create-snapshot'
825               current-parameters: true
826               predefined-parameters: |
827                 SNAP_TYPE=csit
828               node-parameters: true
829               kill-phase-on: FAILURE
830               abort-all-job: true
831               git-revision: false
832       - multijob:
833           name: upload snapshot
834           condition: SUCCESSFUL
835           projects:
836             - name: 'apex-upload-snapshot'
837               current-parameters: true
838               predefined-parameters: |
839                 SNAP_TYPE=csit
840               node-parameters: true
841               kill-phase-on: FAILURE
842               abort-all-job: true
843               git-revision: false
844
845 # FDIO promote
846 - job-template:
847     name: 'apex-fdio-promote-daily-{stream}'
848
849     # Job template for promoting CSIT Snapshots
850     #
851     # Required Variables:
852     #     stream:    branch with - in place of / (eg. stable)
853     #     branch:    branch (eg. stable)
854     node: '{virtual-slave}'
855     project-type: 'multijob'
856     disabled: false
857
858     scm:
859       - git-scm
860
861     parameters:
862       - project-parameter:
863           project: '{project}'
864           branch: '{branch}'
865       - apex-parameter:
866           gs-pathname: '{gs-pathname}'
867
868     properties:
869       - build-blocker:
870           use-build-blocker: true
871           blocking-level: 'NODE'
872           blocking-jobs:
873             - 'apex-verify.*'
874             - 'apex-deploy.*'
875             - 'apex-runner.*'
876             - 'apex-daily.*'
877
878     builders:
879       - multijob:
880           name: build
881           condition: SUCCESSFUL
882           projects:
883             - name: 'apex-build-{stream}'
884               current-parameters: false
885               predefined-parameters: |
886                 GERRIT_BRANCH=$GERRIT_BRANCH
887                 GERRIT_REFSPEC=$GERRIT_REFSPEC
888                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
889                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
890               node-parameters: false
891               kill-phase-on: FAILURE
892               abort-all-job: true
893               git-revision: true
894       - multijob:
895           name: deploy-virtual
896           condition: SUCCESSFUL
897           projects:
898             - name: 'apex-deploy-virtual-{stream}'
899               current-parameters: false
900               predefined-parameters: |
901                 DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha
902                 OPNFV_CLEAN=yes
903                 GERRIT_BRANCH=$GERRIT_BRANCH
904                 GERRIT_REFSPEC=$GERRIT_REFSPEC
905                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
906                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
907                 PROMOTE=True
908               node-parameters: true
909               kill-phase-on: FAILURE
910               abort-all-job: true
911               git-revision: false
912       - multijob:
913           name: create snapshot
914           condition: SUCCESSFUL
915           projects:
916             - name: 'apex-create-snapshot'
917               current-parameters: false
918               predefined-parameters: |
919                 SNAP_TYPE=fdio
920               node-parameters: true
921               kill-phase-on: FAILURE
922               abort-all-job: true
923               git-revision: false
924       - multijob:
925           name: upload snapshot
926           condition: SUCCESSFUL
927           projects:
928             - name: 'apex-upload-snapshot'
929               current-parameters: false
930               predefined-parameters: |
931                 SNAP_TYPE=fdio
932               node-parameters: true
933               kill-phase-on: FAILURE
934               abort-all-job: true
935               git-revision: false
936
937 # Flex job
938 - job-template:
939     name: 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}'
940
941     project-type: 'multijob'
942
943     disabled: false
944
945     node: 'flex-pod2'
946
947     scm:
948       - git-scm
949
950     triggers:
951       - 'apex-{stream}'
952
953     parameters:
954       - '{project}-defaults'
955       - project-parameter:
956           project: '{project}'
957           branch: '{branch}'
958       - apex-parameter:
959           gs-pathname: '{gs-pathname}'
960       - string:
961           name: DEPLOY_SCENARIO
962           default: 'os-nosdn-nofeature-ha'
963           description: "Scenario to deploy with."
964       - string:
965           name: GIT_BASE
966           default: https://gerrit.opnfv.org/gerrit/$PROJECT
967           description: 'Git URL to use on this Jenkins Slave'
968       - string:
969           name: SSH_KEY
970           default: /root/.ssh/id_rsa
971           description: 'SSH key to use for Apex'
972
973     properties:
974       - logrotate-default
975       - build-blocker:
976           use-build-blocker: true
977           blocking-level: 'NODE'
978           blocking-jobs:
979             - 'apex-verify.*'
980             - 'apex-runner.*'
981             - 'apex-.*-promote.*'
982             - 'apex-run.*'
983             - 'apex-.+-baremetal-.+'
984       - throttle:
985           max-per-node: 1
986           max-total: 10
987           option: 'project'
988
989     builders:
990       - description-setter:
991           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
992       - multijob:
993           name: 'Baremetal Deploy'
994           condition: SUCCESSFUL
995           projects:
996             - name: 'apex-deploy-baremetal-{stream}'
997               node-parameters: true
998               current-parameters: true
999               predefined-parameters: |
1000                 OPNFV_CLEAN=yes
1001                 GERRIT_BRANCH=$GERRIT_BRANCH
1002                 GERRIT_REFSPEC=
1003                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
1004               kill-phase-on: FAILURE
1005               abort-all-job: true
1006               git-revision: false
1007       - multijob:
1008           name: Yardstick
1009           condition: ALWAYS
1010           projects:
1011             - name: 'yardstick-apex-baremetal-daily-{stream}'
1012               node-parameters: true
1013               current-parameters: false
1014               predefined-parameters:
1015                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
1016               kill-phase-on: NEVER
1017               abort-all-job: false
1018               git-revision: false
1019
1020 # Dovetail Danube test job
1021 - job-template:
1022     name: 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube'
1023
1024     project-type: 'multijob'
1025
1026     node: 'huawei-pod4'
1027
1028     disabled: false
1029
1030     parameters:
1031       - '{project}-defaults'
1032       - project-parameter:
1033           project: '{project}'
1034           branch: 'stable/danube'
1035       - apex-parameter:
1036           gs-pathname: '/danube'
1037       - string:
1038           name: DEPLOY_SCENARIO
1039           default: 'os-nosdn-nofeature-ha'
1040           description: "Scenario to deploy with."
1041
1042     properties:
1043       - logrotate-default
1044       - build-blocker:
1045           use-build-blocker: true
1046           blocking-level: 'NODE'
1047           blocking-jobs:
1048             - 'apex-verify.*'
1049             - 'apex-runner.*'
1050             - 'apex-.*-promote.*'
1051             - 'apex-run.*'
1052
1053     triggers:
1054       - timed: ''  # '0 1 * * *'
1055
1056     builders:
1057       - description-setter:
1058           description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
1059       - multijob:
1060           name: 'Baremetal Deploy'
1061           condition: SUCCESSFUL
1062           projects:
1063             - name: 'apex-deploy-baremetal-danube'
1064               node-parameters: true
1065               current-parameters: true
1066               predefined-parameters: |
1067                 OPNFV_CLEAN=yes
1068                 GERRIT_BRANCH=$GERRIT_BRANCH
1069                 GERRIT_REFSPEC=
1070                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
1071               kill-phase-on: FAILURE
1072               abort-all-job: true
1073               git-revision: false
1074       - multijob:
1075           name: Dovetail
1076           condition: ALWAYS
1077           projects:
1078             - name: 'dovetail-apex-baremetal-proposed_tests-danube'
1079               node-parameters: true
1080               current-parameters: false
1081               predefined-parameters:
1082                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
1083               kill-phase-on: NEVER
1084               abort-all-job: false
1085               git-revision: false
1086
1087 ########################
1088 # parameter macros
1089 ########################
1090 - parameter:
1091     name: apex-parameter
1092     parameters:
1093       - string:
1094           name: ARTIFACT_NAME
1095           default: 'latest'
1096           description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
1097       - string:
1098           name: ARTIFACT_VERSION
1099           default: 'daily'
1100           description: "Artifact version type"
1101       - string:
1102           name: BUILD_DIRECTORY
1103           default: $WORKSPACE/.build
1104           description: "Directory where the build artifact will be located upon the completion of the build."
1105       - string:
1106           name: CACHE_DIRECTORY
1107           default: $HOME/opnfv/apex-cache{gs-pathname}
1108           description: "Directory where the cache to be used during the build is located."
1109       # yamllint disable rule:line-length
1110       - string:
1111           name: GIT_BASE
1112           default: https://gerrit.opnfv.org/gerrit/$PROJECT
1113           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
1114       # yamllint enable rule:line-length
1115       - string:
1116           name: GS_PATHNAME
1117           default: '{gs-pathname}'
1118           description: "Version directory where opnfv artifacts are stored in gs repository"
1119       - string:
1120           name: GS_URL
1121           default: $GS_BASE{gs-pathname}
1122           description: "URL to Google Storage."
1123       - string:
1124           name: PROMOTE
1125           default: 'False'
1126           description: "Flag to know if we should promote/upload snapshot artifacts."
1127
1128 ########################
1129 # builder macros
1130 ########################
1131 {% for stream in scenarios %}
1132 # {{ stream }} Builder
1133 - builder:
1134     name: apex-builder-{{ stream }}
1135     builders:
1136       - multijob:
1137           name: Baremetal Deploy and Test Phase
1138           condition: SUCCESSFUL
1139           projects:
1140 {%- for scenario in scenarios[stream] %}
1141             - name: 'apex-{{ scenario }}-baremetal-{{ stream }}'
1142               node-parameters: false
1143               current-parameters: false
1144               predefined-parameters: |
1145                 OPNFV_CLEAN=yes
1146               kill-phase-on: NEVER
1147               abort-all-job: true
1148               git-revision: false
1149 {%- endfor %}
1150 {% endfor -%}
1151
1152 - builder:
1153     name: 'apex-upload-artifact'
1154     builders:
1155       - shell:
1156           !include-raw: ./apex-upload-artifact.sh
1157
1158 - builder:
1159     name: 'apex-download-artifact'
1160     builders:
1161       - shell:
1162           !include-raw: ./apex-download-artifact.sh
1163
1164 - builder:
1165     name: 'apex-deploy'
1166     builders:
1167       - shell:
1168           !include-raw: ./apex-deploy.sh
1169
1170 - builder:
1171     name: 'apex-fetch-logs'
1172     builders:
1173       - shell:
1174           !include-raw: ./apex-fetch-logs.sh
1175
1176 #######################
1177 # trigger macros
1178 # timed is in format: 'min hour daymonth month dayweek'
1179 ########################
1180 - trigger:
1181     name: 'apex-master'
1182     triggers:
1183       - timed: '0 0 1-31/2 * *'
1184
1185 - trigger:
1186     name: 'apex-gambia'
1187     triggers:
1188       - timed: '0 4 2-30/2 * *'
1189
1190 - trigger:
1191     name: 'apex-fraser'
1192     triggers:
1193       - timed: '0 0 2-30/2 * *'
1194
1195 - trigger:
1196     name: 'apex-euphrates'
1197     triggers:
1198       - timed: '0 0 2-30/2 * *'
1199
1200 - trigger:
1201     name: 'apex-danube'
1202     triggers:
1203       - timed: '0 3 1 1 7'
1204
1205 - trigger:
1206     name: 'master-master'
1207     triggers:
1208       - timed: '0 12 * * *'
1209
1210 - trigger:
1211     name: 'master-rocky'
1212     triggers:
1213       - timed: '0 12 * * *'
1214
1215 - trigger:
1216     name: 'master-queens'
1217     triggers:
1218       - timed: ''
1219
1220 - trigger:
1221     name: 'gambia-master'
1222     triggers:
1223       - timed: ''
1224
1225 - trigger:
1226     name: 'gambia-rocky'
1227     triggers:
1228       - timed: ''
1229
1230 - trigger:
1231     name: 'gambia-queens'
1232     triggers:
1233       - timed: '0 12 * * *'
1234
1235 - trigger:
1236     name: 'fraser-master'
1237     triggers:
1238       - timed: ''
1239
1240 - trigger:
1241     name: 'fraser-rocky'
1242     triggers:
1243       - timed: ''
1244
1245 - trigger:
1246     name: 'fraser-queens'
1247     triggers:
1248       - timed: ''
1249
1250 - trigger:
1251     name: 'euphrates-master'
1252     triggers:
1253       - timed: ''
1254
1255 - trigger:
1256     name: 'euphrates-rocky'
1257     triggers:
1258       - timed: ''
1259
1260 - trigger:
1261     name: 'euphrates-queens'
1262     triggers:
1263       - timed: ''
1264
1265 - trigger:
1266     name: 'danube-master'
1267     triggers:
1268       - timed: ''
1269
1270 - trigger:
1271     name: 'danube-rocky'
1272     triggers:
1273       - timed: ''
1274
1275 - trigger:
1276     name: 'danube-queens'
1277     triggers:
1278       - timed: ''