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