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