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