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