Merge "update scenario scores"
[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: SUCCESSFUL
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             projects:
604                 - name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
605                   node-parameters: true
606                   current-parameters: false
607                   predefined-parameters:
608                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
609                   kill-phase-on: NEVER
610                   abort-all-job: true
611                   git-revision: false
612
613     publishers:
614         - groovy-postbuild:
615             script:
616                 !include-raw-escape: ./update-build-result.groovy
617
618 # Baremetal test job
619 - job-template:
620     name: 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
621
622     project-type: 'multijob'
623
624     disabled: false
625
626     parameters:
627         - '{project}-defaults'
628         - '{project}-baremetal-{scenario_stream}-defaults'
629         - project-parameter:
630             project: '{project}'
631             branch: '{branch}'
632         - apex-parameter:
633             gs-pathname: '{gs-pathname}'
634         - string:
635             name: DEPLOY_SCENARIO
636             default: '{scenario}'
637             description: "Scenario to deploy with."
638     properties:
639         - logrotate-default
640         - build-blocker:
641             use-build-blocker: true
642             block-level: 'NODE'
643             blocking-jobs:
644                 - 'apex-verify.*'
645                 - 'apex-runner.*'
646                 - 'apex-.*-promote.*'
647                 - 'apex-run.*'
648                 - 'apex-testsuite-.+-baremetal-.+'
649         - throttle:
650             max-per-node: 1
651             max-total: 10
652             option: 'project'
653     builders:
654         - description-setter:
655             description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
656         - multijob:
657             name: Functest
658             condition: ALWAYS
659             projects:
660                 - name: 'functest-apex-baremetal-daily-{scenario_stream}'
661                   node-parameters: true
662                   current-parameters: false
663                   predefined-parameters:
664                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
665                   kill-phase-on: NEVER
666                   abort-all-job: false
667                   git-revision: false
668         - multijob:
669             name: Yardstick
670             condition: ALWAYS
671             projects:
672                 - name: 'yardstick-apex-baremetal-daily-{scenario_stream}'
673                   node-parameters: true
674                   current-parameters: false
675                   predefined-parameters:
676                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
677                   kill-phase-on: NEVER
678                   abort-all-job: false
679                   git-revision: false
680         - multijob:
681             name: Dovetail
682             condition: ALWAYS
683             projects:
684                 - name: 'dovetail-apex-baremetal-proposed_tests-{scenario_stream}'
685                   node-parameters: true
686                   current-parameters: false
687                   predefined-parameters:
688                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
689                   kill-phase-on: NEVER
690                   enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|nosdn-kvm|odl_l3-fdio)-ha/"
691                   abort-all-job: false
692                   git-revision: false
693 # Build status is always success due conditional plugin prefetching
694 # build status before multijob phases execute
695 #        - conditional-step:
696 #            condition-kind: current-status
697 #            condition-worst: SUCCESS
698 #            condtion-best: SUCCESS
699 #            on-evaluation-failure: mark-unstable
700 #            steps:
701 #                - shell: 'echo "Tests Passed"'
702
703 {% for stream in scenarios %}
704 # {{ stream }} Daily
705 - job-template:
706     name: 'apex-daily-{{ stream }}'
707
708     # Job template for daily build
709     #
710     # Required Variables:
711     #     stream:    branch with - in place of / (eg. stable)
712     #     branch:    branch (eg. stable)
713     project-type: 'multijob'
714
715     node: '{{ build_slave[stream] }}'
716
717     disabled: false
718
719     scm:
720         - git-scm
721
722     parameters:
723         - '{project}-defaults'
724         - '{project}-baremetal-{{ stream }}-defaults'
725         - project-parameter:
726             project: '{project}'
727             branch: '{{ branch[stream] }}'
728         - apex-parameter:
729             gs-pathname: '{{ gspathname[stream] }}'
730
731     properties:
732         - logrotate-default
733
734     triggers:
735         - 'apex-{{ stream }}'
736
737     builders:
738         - multijob:
739             name: build
740             condition: SUCCESSFUL
741             projects:
742                 - name: 'apex-build-{{ stream }}'
743                   current-parameters: false
744                   predefined-parameters: |
745                     GERRIT_BRANCH=$GERRIT_BRANCH
746                     GERRIT_REFSPEC=
747                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
748                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
749                   node-parameters: true
750                   kill-phase-on: FAILURE
751                   abort-all-job: true
752                   git-revision: true
753         - multijob:
754             name: 'Verify and upload ISO'
755             condition: SUCCESSFUL
756             projects:
757                 - name: 'apex-verify-iso-{{ stream }}'
758                   current-parameters: false
759                   predefined-parameters: |
760                     BUILD_DIRECTORY=$WORKSPACE/../apex-build-{{ stream }}/.build
761                     GERRIT_BRANCH=$GERRIT_BRANCH
762                     GERRIT_REFSPEC=
763                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
764                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
765                   node-parameters: true
766                   kill-phase-on: FAILURE
767                   abort-all-job: true
768                   git-revision: true
769         - multijob:
770             name: Baremetal Deploy and Test Phase
771             condition: SUCCESSFUL
772             projects:
773 {% for scenario in scenarios[stream] %}
774                 - name: 'apex-{{ scenario }}-baremetal-{{ stream }}'
775                   node-parameters: false
776                   current-parameters: false
777                   predefined-parameters: |
778                     OPNFV_CLEAN=yes
779                   kill-phase-on: NEVER
780                   abort-all-job: true
781                   git-revision: false
782 {% endfor %}
783 {% endfor %}
784
785 # snapshot create
786 - job-template:
787     name: 'apex-create-snapshot'
788
789     # Job template for clean
790     #
791     # Required Variables:
792     #     stream:    branch with - in place of / (eg. stable)
793
794     disabled: false
795
796     builders:
797         - shell:
798             !include-raw-escape: ./apex-snapshot-create.sh
799
800 # snapshot upload
801 - job-template:
802     name: 'apex-upload-snapshot'
803
804     # Job template for clean
805     #
806     # Required Variables:
807     #     stream:    branch with - in place of / (eg. stable)
808
809     disabled: false
810
811     builders:
812         - inject:
813            properties-content: ARTIFACT_TYPE=snapshot
814         - 'apex-upload-artifact'
815
816 # CSIT promote
817 - job-template:
818     name: 'apex-csit-promote-daily-{stream}'
819
820     # Job template for promoting CSIT Snapshots
821     #
822     # Required Variables:
823     #     stream:    branch with - in place of / (eg. stable)
824     #     branch:    branch (eg. stable)
825     node: '{virtual-slave}'
826     project-type: 'multijob'
827     disabled: false
828
829     scm:
830         - git-scm
831
832     parameters:
833         - project-parameter:
834             project: '{project}'
835             branch: '{branch}'
836         - apex-parameter:
837             gs-pathname: '{gs-pathname}'
838
839     properties:
840         - build-blocker:
841             use-build-blocker: true
842             block-level: 'NODE'
843             blocking-jobs:
844                 - 'apex-verify.*'
845                 - 'apex-deploy.*'
846                 - 'apex-runner.*'
847                 - 'apex-daily.*'
848
849     triggers:
850         - timed: '0 12 * * 0'
851
852     builders:
853         - multijob:
854             name: build
855             condition: SUCCESSFUL
856             projects:
857                 - name: 'apex-build-{stream}'
858                   current-parameters: false
859                   predefined-parameters: |
860                     GERRIT_BRANCH=$GERRIT_BRANCH
861                     GERRIT_REFSPEC=$GERRIT_REFSPEC
862                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
863                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
864                   node-parameters: false
865                   kill-phase-on: FAILURE
866                   abort-all-job: true
867                   git-revision: true
868         - multijob:
869             name: deploy-virtual
870             condition: SUCCESSFUL
871             projects:
872                 - name: 'apex-deploy-virtual-{stream}'
873                   current-parameters: false
874                   predefined-parameters: |
875                     DEPLOY_SCENARIO=os-odl_l3-csit-noha
876                     OPNFV_CLEAN=yes
877                     GERRIT_BRANCH=$GERRIT_BRANCH
878                     GERRIT_REFSPEC=$GERRIT_REFSPEC
879                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
880                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
881                     PROMOTE=True
882                   node-parameters: true
883                   kill-phase-on: FAILURE
884                   abort-all-job: true
885                   git-revision: false
886         - multijob:
887             name: functest-smoke
888             condition: SUCCESSFUL
889             projects:
890               - name: 'functest-apex-virtual-suite-{stream}'
891                 current-parameters: false
892                 predefined-parameters: |
893                   DEPLOY_SCENARIO=os-odl_l3-nofeature-noha
894                   FUNCTEST_SUITE_NAME=tempest_smoke_serial
895                   GERRIT_BRANCH=$GERRIT_BRANCH
896                   GERRIT_REFSPEC=$GERRIT_REFSPEC
897                   GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
898                   GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
899                 node-parameters: true
900                 kill-phase-on: FAILURE
901                 abort-all-job: true
902                 git-revision: false
903         - multijob:
904             name: create snapshot
905             condition: SUCCESSFUL
906             projects:
907               - name: 'apex-create-snapshot'
908                 current-parameters: false
909                 predefined-parameters: |
910                   SNAP_TYPE=csit
911                 node-parameters: true
912                 kill-phase-on: FAILURE
913                 abort-all-job: true
914                 git-revision: false
915         - multijob:
916             name: upload snapshot
917             condition: SUCCESSFUL
918             projects:
919               - name: 'apex-upload-snapshot'
920                 current-parameters: false
921                 predefined-parameters: |
922                   SNAP_TYPE=csit
923                 node-parameters: true
924                 kill-phase-on: FAILURE
925                 abort-all-job: true
926                 git-revision: false
927
928 # FDIO promote
929 - job-template:
930     name: 'apex-fdio-promote-daily-{stream}'
931
932     # Job template for promoting CSIT Snapshots
933     #
934     # Required Variables:
935     #     stream:    branch with - in place of / (eg. stable)
936     #     branch:    branch (eg. stable)
937     node: '{virtual-slave}'
938     project-type: 'multijob'
939     disabled: false
940
941     scm:
942         - git-scm
943
944     parameters:
945         - project-parameter:
946             project: '{project}'
947             branch: '{branch}'
948         - apex-parameter:
949             gs-pathname: '{gs-pathname}'
950
951     properties:
952         - build-blocker:
953             use-build-blocker: true
954             block-level: 'NODE'
955             blocking-jobs:
956                 - 'apex-verify.*'
957                 - 'apex-deploy.*'
958                 - 'apex-runner.*'
959                 - 'apex-daily.*'
960
961     builders:
962         - multijob:
963             name: build
964             condition: SUCCESSFUL
965             projects:
966                 - name: 'apex-build-{stream}'
967                   current-parameters: false
968                   predefined-parameters: |
969                     GERRIT_BRANCH=$GERRIT_BRANCH
970                     GERRIT_REFSPEC=$GERRIT_REFSPEC
971                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
972                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
973                   node-parameters: false
974                   kill-phase-on: FAILURE
975                   abort-all-job: true
976                   git-revision: true
977         - multijob:
978             name: deploy-virtual
979             condition: SUCCESSFUL
980             projects:
981                 - name: 'apex-deploy-virtual-{stream}'
982                   current-parameters: false
983                   predefined-parameters: |
984                     DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha
985                     OPNFV_CLEAN=yes
986                     GERRIT_BRANCH=$GERRIT_BRANCH
987                     GERRIT_REFSPEC=$GERRIT_REFSPEC
988                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
989                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
990                     PROMOTE=True
991                   node-parameters: true
992                   kill-phase-on: FAILURE
993                   abort-all-job: true
994                   git-revision: false
995         - multijob:
996             name: create snapshot
997             condition: SUCCESSFUL
998             projects:
999               - name: 'apex-create-snapshot'
1000                 current-parameters: false
1001                 predefined-parameters: |
1002                   SNAP_TYPE=fdio
1003                 node-parameters: true
1004                 kill-phase-on: FAILURE
1005                 abort-all-job: true
1006                 git-revision: false
1007         - multijob:
1008             name: upload snapshot
1009             condition: SUCCESSFUL
1010             projects:
1011               - name: 'apex-upload-snapshot'
1012                 current-parameters: false
1013                 predefined-parameters: |
1014                   SNAP_TYPE=fdio
1015                 node-parameters: true
1016                 kill-phase-on: FAILURE
1017                 abort-all-job: true
1018                 git-revision: false
1019
1020 ########################
1021 # parameter macros
1022 ########################
1023 - parameter:
1024     name: apex-parameter
1025     parameters:
1026         - string:
1027             name: ARTIFACT_NAME
1028             default: 'latest'
1029             description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
1030         - string:
1031             name: ARTIFACT_VERSION
1032             default: 'daily'
1033             description: "Artifact version type"
1034         - string:
1035             name: BUILD_DIRECTORY
1036             default: $WORKSPACE/.build
1037             description: "Directory where the build artifact will be located upon the completion of the build."
1038         - string:
1039             name: CACHE_DIRECTORY
1040             default: $HOME/opnfv/apex-cache{gs-pathname}
1041             description: "Directory where the cache to be used during the build is located."
1042         - string:
1043             name: GIT_BASE
1044             default: https://gerrit.opnfv.org/gerrit/$PROJECT
1045             description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
1046         - string:
1047             name: GS_PATHNAME
1048             default: '{gs-pathname}'
1049             description: "Version directory where opnfv artifacts are stored in gs repository"
1050         - string:
1051             name: GS_URL
1052             default: $GS_BASE{gs-pathname}
1053             description: "URL to Google Storage."
1054         - string:
1055             name: PROMOTE
1056             default: 'False'
1057             description: "Flag to know if we should promote/upload snapshot artifacts."
1058
1059 ########################
1060 # builder macros
1061 ########################
1062 - builder:
1063     name: 'apex-unit-test'
1064     builders:
1065         - shell:
1066             !include-raw: ./apex-unit-test.sh
1067
1068 - builder:
1069     name: 'apex-build'
1070     builders:
1071         - shell:
1072             !include-raw: ./apex-build.sh
1073
1074 - builder:
1075     name: 'apex-workspace-cleanup'
1076     builders:
1077         - shell:
1078             !include-raw: ./apex-workspace-cleanup.sh
1079
1080 - builder:
1081     name: 'apex-iso-verify'
1082     builders:
1083         - shell:
1084             !include-raw: ./apex-iso-verify.sh
1085
1086
1087 - builder:
1088     name: 'apex-upload-artifact'
1089     builders:
1090         - shell:
1091             !include-raw: ./apex-upload-artifact.sh
1092
1093 - builder:
1094     name: 'apex-download-artifact'
1095     builders:
1096         - shell:
1097             !include-raw: ./apex-download-artifact.sh
1098
1099 - builder:
1100     name: 'apex-deploy'
1101     builders:
1102         - shell:
1103             !include-raw: ./apex-deploy.sh
1104
1105 #######################
1106 # trigger macros
1107 ########################
1108 - trigger:
1109     name: 'apex-master'
1110     triggers:
1111         - timed: '0 12 * * *'
1112 - trigger:
1113     name: 'apex-danube'
1114     triggers:
1115         - timed: '0 3 1 1 7'
1116