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