Move Apex Verify Jobs to apex-verify-jobs file
[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: true
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: false
39       - danube: &danube
40           branch: 'stable/danube'
41           gs-pathname: '/danube'
42           build-slave: 'apex-build-danube'
43           virtual-slave: 'apex-virtual-danube'
44           baremetal-slave: 'apex-baremetal-danube'
45           verify-scenario: 'os-odl_l3-nofeature-ha'
46           scenario_stream: 'danube'
47           disabled: true
48           disable_daily: true
49
50     scenario:
51       {%- for stream in scenarios %}
52       {%- for scenario in scenarios[stream] %}
53       - '{{scenario}}':
54           <<: *{{stream}}
55       {%- endfor %}
56       {%- endfor %}
57
58     platform:
59       - 'baremetal'
60       - 'virtual'
61
62 - job-template:
63     name: 'apex-runner-cperf-{stream}'
64
65     # runner cperf job
66     project-type: 'multijob'
67     node: 'intel-pod2'
68
69     disabled: false
70
71     parameters:
72       - apex-parameter:
73           gs-pathname: '{gs-pathname}'
74       - project-parameter:
75           project: '{project}'
76           branch: '{branch}'
77       - string:
78           name: GIT_BASE
79           default: https://gerrit.opnfv.org/gerrit/$PROJECT
80           description: "Used for overriding the GIT URL coming from parameters macro."
81
82     scm:
83       - git-scm
84
85     properties:
86       - logrotate-default
87       - build-blocker:
88           use-build-blocker: false
89           block-level: 'NODE'
90           blocking-jobs:
91             - 'apex-deploy.*'
92       - throttle:
93           max-per-node: 1
94           max-total: 10
95           option: 'project'
96
97     builders:
98       - description-setter:
99           description: "Deployed on $NODE_NAME"
100       - multijob:
101           name: 'Baremetal Deploy'
102           condition: ALWAYS
103           projects:
104             - name: 'apex-deploy-baremetal-{stream}'
105               node-parameters: false
106               current-parameters: true
107               predefined-parameters: |
108                 GERRIT_BRANCH=$GERRIT_BRANCH
109                 GERRIT_REFSPEC=
110                 OPNFV_CLEAN=yes
111                 DEPLOY_SCENARIO={verify-scenario}
112               kill-phase-on: FAILURE
113               abort-all-job: true
114               git-revision: false
115       - multijob:
116           name: CPERF
117           condition: SUCCESSFUL
118           projects:
119             - name: 'cperf-apex-intel-pod2-daily-master'
120               node-parameters: true
121               current-parameters: false
122               predefined-parameters:
123                 DEPLOY_SCENARIO={verify-scenario}
124               kill-phase-on: NEVER
125               abort-all-job: false
126               git-revision: false
127
128 # Deploy job
129 - job-template:
130     name: 'apex-deploy-{platform}-{stream}'
131
132     node: 'apex-{platform}-{stream}'
133
134     concurrent: true
135
136     disabled: false
137     quiet-period: 30
138     scm:
139       - git-scm-gerrit
140
141     wrappers:
142       - timeout:
143           timeout: 140
144           fail: true
145
146     parameters:
147       - '{project}-{platform}-{stream}-defaults'
148       - project-parameter:
149           project: '{project}'
150           branch: '{branch}'
151       - apex-parameter:
152           gs-pathname: '{gs-pathname}'
153       - string:
154           name: DEPLOY_SCENARIO
155           default: '{verify-scenario}'
156           description: "Scenario to deploy with."
157       # yamllint disable rule:line-length
158       - string:
159           name: OPNFV_CLEAN
160           default: 'no'
161           description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment"
162
163     # yamllint enable rule:line-length
164     properties:
165       - logrotate-default
166       - build-blocker:
167           use-build-blocker: true
168           block-level: 'NODE'
169           blocking-jobs:
170             - 'apex-deploy.*'
171             - 'functest.*'
172             - 'yardstick.*'
173             - 'dovetail.*'
174             - 'storperf.*'
175       - throttle:
176           max-per-node: 1
177           max-total: 10
178           option: 'project'
179
180     builders:
181       - description-setter:
182           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
183       - 'apex-download-artifact'
184       - 'apex-deploy'
185       - 'clean-workspace'
186
187
188 # Virtual Deploy and Test
189 - job-template:
190     name: 'apex-virtual-{stream}'
191
192     project-type: 'multijob'
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|nosdn-kvm|odl_l3-fdio)-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     node: '{baremetal-slave}'
457
458     disabled: '{obj:disable_daily}'
459
460     scm:
461       - git-scm
462
463     parameters:
464       - '{project}-defaults'
465       - '{project}-baremetal-{stream}-defaults'
466       - project-parameter:
467           project: '{project}'
468           branch: '{branch}'
469       - apex-parameter:
470           gs-pathname: '{gs-pathname}'
471
472     properties:
473       - logrotate-default
474       - build-blocker:
475           use-build-blocker: true
476           block-level: 'NODE'
477           blocking-jobs:
478             - 'apex-daily.*'
479
480     triggers:
481       - 'apex-{stream}'
482
483     builders:
484       - multijob:
485           name: build
486           condition: SUCCESSFUL
487           projects:
488             - name: 'apex-build-{stream}'
489               current-parameters: false
490               predefined-parameters: |
491                 GERRIT_BRANCH=$GERRIT_BRANCH
492                 GERRIT_REFSPEC=
493                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
494                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
495               node-parameters: true
496               kill-phase-on: FAILURE
497               abort-all-job: true
498               git-revision: true
499       - multijob:
500           name: 'Verify and upload ISO'
501           condition: SUCCESSFUL
502           projects:
503             - name: 'apex-verify-iso-{stream}'
504               current-parameters: false
505               predefined-parameters: |
506                 BUILD_DIRECTORY=$WORKSPACE/../apex-build-{stream}/.build
507                 GERRIT_BRANCH=$GERRIT_BRANCH
508                 GERRIT_REFSPEC=
509                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
510                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
511               node-parameters: true
512               kill-phase-on: FAILURE
513               abort-all-job: true
514               git-revision: true
515       - apex-builder-{stream}
516
517 # snapshot create
518 - job-template:
519     name: 'apex-create-snapshot'
520
521     # Job template for clean
522     #
523     # Required Variables:
524     #     stream:    branch with - in place of / (eg. stable)
525
526     disabled: false
527
528     builders:
529       - shell:
530           !include-raw-escape: ./apex-snapshot-create.sh
531
532 # snapshot upload
533 - job-template:
534     name: 'apex-upload-snapshot'
535
536     # Job template for clean
537     #
538     # Required Variables:
539     #     stream:    branch with - in place of / (eg. stable)
540
541     disabled: false
542
543     builders:
544       - inject:
545           properties-content: ARTIFACT_TYPE=snapshot
546       - 'apex-upload-artifact'
547
548 # CSIT promote
549 - job-template:
550     name: 'apex-csit-promote-daily-{stream}'
551
552     # Job template for promoting CSIT Snapshots
553     #
554     # Required Variables:
555     #     stream:    branch with - in place of / (eg. stable)
556     #     branch:    branch (eg. stable)
557     node: '{virtual-slave}'
558     project-type: 'multijob'
559     disabled: false
560
561     scm:
562       - git-scm
563
564     parameters:
565       - project-parameter:
566           project: '{project}'
567           branch: '{branch}'
568       - apex-parameter:
569           gs-pathname: '{gs-pathname}'
570
571     properties:
572       - build-blocker:
573           use-build-blocker: true
574           block-level: 'NODE'
575           blocking-jobs:
576             - 'apex-verify.*'
577             - 'apex-deploy.*'
578             - 'apex-runner.*'
579             - 'apex-daily.*'
580
581     triggers:
582       - timed: '0 12 * * 0'
583
584     builders:
585       - multijob:
586           name: build
587           condition: SUCCESSFUL
588           projects:
589             - name: 'apex-build-{stream}'
590               current-parameters: false
591               predefined-parameters: |
592                 GERRIT_BRANCH=$GERRIT_BRANCH
593                 GERRIT_REFSPEC=$GERRIT_REFSPEC
594                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
595                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
596               node-parameters: false
597               kill-phase-on: FAILURE
598               abort-all-job: true
599               git-revision: true
600       - multijob:
601           name: deploy-virtual
602           condition: SUCCESSFUL
603           projects:
604             - name: 'apex-deploy-virtual-{stream}'
605               current-parameters: false
606               predefined-parameters: |
607                 DEPLOY_SCENARIO=os-odl_l3-csit-noha
608                 OPNFV_CLEAN=yes
609                 GERRIT_BRANCH=$GERRIT_BRANCH
610                 GERRIT_REFSPEC=$GERRIT_REFSPEC
611                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
612                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
613                 PROMOTE=True
614               node-parameters: true
615               kill-phase-on: FAILURE
616               abort-all-job: true
617               git-revision: false
618       - multijob:
619           name: functest-smoke
620           condition: SUCCESSFUL
621           projects:
622             - name: 'functest-apex-virtual-suite-{stream}'
623               current-parameters: false
624               predefined-parameters: |
625                 DEPLOY_SCENARIO=os-odl_l3-nofeature-noha
626                 FUNCTEST_SUITE_NAME=tempest_smoke_serial
627                 GERRIT_BRANCH=$GERRIT_BRANCH
628                 GERRIT_REFSPEC=$GERRIT_REFSPEC
629                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
630                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
631               node-parameters: true
632               kill-phase-on: FAILURE
633               abort-all-job: true
634               git-revision: false
635       - multijob:
636           name: create snapshot
637           condition: SUCCESSFUL
638           projects:
639             - name: 'apex-create-snapshot'
640               current-parameters: false
641               predefined-parameters: |
642                 SNAP_TYPE=csit
643               node-parameters: true
644               kill-phase-on: FAILURE
645               abort-all-job: true
646               git-revision: false
647       - multijob:
648           name: upload snapshot
649           condition: SUCCESSFUL
650           projects:
651             - name: 'apex-upload-snapshot'
652               current-parameters: false
653               predefined-parameters: |
654                 SNAP_TYPE=csit
655               node-parameters: true
656               kill-phase-on: FAILURE
657               abort-all-job: true
658               git-revision: false
659
660 # FDIO promote
661 - job-template:
662     name: 'apex-fdio-promote-daily-{stream}'
663
664     # Job template for promoting CSIT Snapshots
665     #
666     # Required Variables:
667     #     stream:    branch with - in place of / (eg. stable)
668     #     branch:    branch (eg. stable)
669     node: '{virtual-slave}'
670     project-type: 'multijob'
671     disabled: false
672
673     scm:
674       - git-scm
675
676     parameters:
677       - project-parameter:
678           project: '{project}'
679           branch: '{branch}'
680       - apex-parameter:
681           gs-pathname: '{gs-pathname}'
682
683     properties:
684       - build-blocker:
685           use-build-blocker: true
686           block-level: 'NODE'
687           blocking-jobs:
688             - 'apex-verify.*'
689             - 'apex-deploy.*'
690             - 'apex-runner.*'
691             - 'apex-daily.*'
692
693     builders:
694       - multijob:
695           name: build
696           condition: SUCCESSFUL
697           projects:
698             - name: 'apex-build-{stream}'
699               current-parameters: false
700               predefined-parameters: |
701                 GERRIT_BRANCH=$GERRIT_BRANCH
702                 GERRIT_REFSPEC=$GERRIT_REFSPEC
703                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
704                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
705               node-parameters: false
706               kill-phase-on: FAILURE
707               abort-all-job: true
708               git-revision: true
709       - multijob:
710           name: deploy-virtual
711           condition: SUCCESSFUL
712           projects:
713             - name: 'apex-deploy-virtual-{stream}'
714               current-parameters: false
715               predefined-parameters: |
716                 DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha
717                 OPNFV_CLEAN=yes
718                 GERRIT_BRANCH=$GERRIT_BRANCH
719                 GERRIT_REFSPEC=$GERRIT_REFSPEC
720                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
721                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
722                 PROMOTE=True
723               node-parameters: true
724               kill-phase-on: FAILURE
725               abort-all-job: true
726               git-revision: false
727       - multijob:
728           name: create snapshot
729           condition: SUCCESSFUL
730           projects:
731             - name: 'apex-create-snapshot'
732               current-parameters: false
733               predefined-parameters: |
734                 SNAP_TYPE=fdio
735               node-parameters: true
736               kill-phase-on: FAILURE
737               abort-all-job: true
738               git-revision: false
739       - multijob:
740           name: upload snapshot
741           condition: SUCCESSFUL
742           projects:
743             - name: 'apex-upload-snapshot'
744               current-parameters: false
745               predefined-parameters: |
746                 SNAP_TYPE=fdio
747               node-parameters: true
748               kill-phase-on: FAILURE
749               abort-all-job: true
750               git-revision: false
751
752 # Flex job
753 - job-template:
754     name: 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}'
755
756     project-type: 'multijob'
757
758     disabled: false
759
760     node: 'flex-pod2'
761
762     scm:
763       - git-scm
764
765     triggers:
766       - 'apex-{stream}'
767
768     parameters:
769       - '{project}-defaults'
770       - project-parameter:
771           project: '{project}'
772           branch: '{branch}'
773       - apex-parameter:
774           gs-pathname: '{gs-pathname}'
775       - string:
776           name: DEPLOY_SCENARIO
777           default: 'os-nosdn-nofeature-ha'
778           description: "Scenario to deploy with."
779       - string:
780           name: GIT_BASE
781           default: https://gerrit.opnfv.org/gerrit/$PROJECT
782           description: 'Git URL to use on this Jenkins Slave'
783       - string:
784           name: SSH_KEY
785           default: /root/.ssh/id_rsa
786           description: 'SSH key to use for Apex'
787
788     properties:
789       - logrotate-default
790       - build-blocker:
791           use-build-blocker: true
792           block-level: 'NODE'
793           blocking-jobs:
794             - 'apex-verify.*'
795             - 'apex-runner.*'
796             - 'apex-.*-promote.*'
797             - 'apex-run.*'
798             - 'apex-.+-baremetal-.+'
799       - throttle:
800           max-per-node: 1
801           max-total: 10
802           option: 'project'
803
804     builders:
805       - description-setter:
806           description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
807       - multijob:
808           name: 'Baremetal Deploy'
809           condition: SUCCESSFUL
810           projects:
811             - name: 'apex-deploy-baremetal-{stream}'
812               node-parameters: true
813               current-parameters: true
814               predefined-parameters: |
815                 OPNFV_CLEAN=yes
816                 GERRIT_BRANCH=$GERRIT_BRANCH
817                 GERRIT_REFSPEC=
818                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
819               kill-phase-on: FAILURE
820               abort-all-job: true
821               git-revision: false
822       - multijob:
823           name: Yardstick
824           condition: ALWAYS
825           projects:
826             - name: 'yardstick-apex-baremetal-daily-{stream}'
827               node-parameters: true
828               current-parameters: false
829               predefined-parameters:
830                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
831               kill-phase-on: NEVER
832               abort-all-job: false
833               git-revision: false
834
835 # Dovetail Danube test job
836 - job-template:
837     name: 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube'
838
839     project-type: 'multijob'
840
841     node: 'huawei-pod4'
842
843     disabled: false
844
845     parameters:
846       - '{project}-defaults'
847       - project-parameter:
848           project: '{project}'
849           branch: 'stable/danube'
850       - apex-parameter:
851           gs-pathname: '/danube'
852       - string:
853           name: DEPLOY_SCENARIO
854           default: 'os-nosdn-nofeature-ha'
855           description: "Scenario to deploy with."
856
857     properties:
858       - logrotate-default
859       - build-blocker:
860           use-build-blocker: true
861           block-level: 'NODE'
862           blocking-jobs:
863             - 'apex-verify.*'
864             - 'apex-runner.*'
865             - 'apex-.*-promote.*'
866             - 'apex-run.*'
867
868     triggers:
869       - timed: ''  # '0 1 * * *'
870
871     builders:
872       - description-setter:
873           description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
874       - multijob:
875           name: 'Baremetal Deploy'
876           condition: SUCCESSFUL
877           projects:
878             - name: 'apex-deploy-baremetal-danube'
879               node-parameters: true
880               current-parameters: true
881               predefined-parameters: |
882                 OPNFV_CLEAN=yes
883                 GERRIT_BRANCH=$GERRIT_BRANCH
884                 GERRIT_REFSPEC=
885                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
886               kill-phase-on: FAILURE
887               abort-all-job: true
888               git-revision: false
889       - multijob:
890           name: Dovetail
891           condition: ALWAYS
892           projects:
893             - name: 'dovetail-apex-baremetal-proposed_tests-danube'
894               node-parameters: true
895               current-parameters: false
896               predefined-parameters:
897                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
898               kill-phase-on: NEVER
899               abort-all-job: false
900               git-revision: false
901
902 ########################
903 # parameter macros
904 ########################
905 - parameter:
906     name: apex-parameter
907     parameters:
908       - string:
909           name: ARTIFACT_NAME
910           default: 'latest'
911           description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
912       - string:
913           name: ARTIFACT_VERSION
914           default: 'daily'
915           description: "Artifact version type"
916       - string:
917           name: BUILD_DIRECTORY
918           default: $WORKSPACE/.build
919           description: "Directory where the build artifact will be located upon the completion of the build."
920       - string:
921           name: CACHE_DIRECTORY
922           default: $HOME/opnfv/apex-cache{gs-pathname}
923           description: "Directory where the cache to be used during the build is located."
924       # yamllint disable rule:line-length
925       - string:
926           name: GIT_BASE
927           default: https://gerrit.opnfv.org/gerrit/$PROJECT
928           description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
929       # yamllint enable rule:line-length
930       - string:
931           name: GS_PATHNAME
932           default: '{gs-pathname}'
933           description: "Version directory where opnfv artifacts are stored in gs repository"
934       - string:
935           name: GS_URL
936           default: $GS_BASE{gs-pathname}
937           description: "URL to Google Storage."
938       - string:
939           name: PROMOTE
940           default: 'False'
941           description: "Flag to know if we should promote/upload snapshot artifacts."
942
943 ########################
944 # builder macros
945 ########################
946 {% for stream in scenarios %}
947 # {{ stream }} Builder
948 - builder:
949     name: apex-builder-{{ stream }}
950     builders:
951       - multijob:
952           name: Baremetal Deploy and Test Phase
953           condition: SUCCESSFUL
954           projects:
955 {%- for scenario in scenarios[stream] %}
956             - name: 'apex-{{ scenario }}-baremetal-{{ stream }}'
957               node-parameters: false
958               current-parameters: false
959               predefined-parameters: |
960                 OPNFV_CLEAN=yes
961               kill-phase-on: NEVER
962               abort-all-job: true
963               git-revision: false
964 {%- endfor %}
965 {% endfor -%}
966
967 - builder:
968     name: 'apex-upload-artifact'
969     builders:
970       - shell:
971           !include-raw: ./apex-upload-artifact.sh
972
973 - builder:
974     name: 'apex-download-artifact'
975     builders:
976       - shell:
977           !include-raw: ./apex-download-artifact.sh
978
979 - builder:
980     name: 'apex-deploy'
981     builders:
982       - shell:
983           !include-raw: ./apex-deploy.sh
984
985 #######################
986 # trigger macros
987 ########################
988 - trigger:
989     name: 'apex-master'
990     triggers:
991       - timed: '0 3 1 1 7'
992
993 - trigger:
994     name: 'apex-euphrates'
995     triggers:
996       - timed: '0 12 * * *'
997
998 - trigger:
999     name: 'apex-danube'
1000     triggers:
1001       - timed: '0 3 1 1 7'
1002