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