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