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