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