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