Merge "cleanup of obsolete non-CI arm PODs"
[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 #                  kill-phase-on: NEVER
722 #                  abort-all-job: false
723 #                  git-revision: false
724 # Build status is always success due conditional plugin prefetching
725 # build status before multijob phases execute
726 #        - conditional-step:
727 #            condition-kind: current-status
728 #            condition-worst: SUCCESS
729 #            condtion-best: SUCCESS
730 #            on-evaluation-failure: mark-unstable
731 #            steps:
732 #                - shell: 'echo "Tests Passed"'
733
734 {% for stream in scenarios %}
735 # {{ stream }} Daily
736 - job-template:
737     name: 'apex-daily-{{ stream }}'
738
739     # Job template for daily build
740     #
741     # Required Variables:
742     #     stream:    branch with - in place of / (eg. stable)
743     #     branch:    branch (eg. stable)
744     project-type: 'multijob'
745
746     node: '{{ build_slave[stream] }}'
747
748     disabled: false
749
750     scm:
751         - git-scm
752
753     parameters:
754         - '{project}-defaults'
755         - '{project}-baremetal-{{ stream }}-defaults'
756         - project-parameter:
757             project: '{project}'
758             branch: '{{ branch[stream] }}'
759         - apex-parameter:
760             gs-pathname: '{{ gspathname[stream] }}'
761
762     properties:
763         - logrotate-default
764
765     triggers:
766         - 'apex-{{ stream }}'
767
768     builders:
769         - multijob:
770             name: build
771             condition: SUCCESSFUL
772             projects:
773                 - name: 'apex-build-{{ stream }}'
774                   current-parameters: false
775                   predefined-parameters: |
776                     GERRIT_BRANCH=$GERRIT_BRANCH
777                     GERRIT_REFSPEC=
778                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
779                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
780                   node-parameters: true
781                   kill-phase-on: FAILURE
782                   abort-all-job: true
783                   git-revision: true
784         - multijob:
785             name: 'Verify and upload ISO'
786             condition: SUCCESSFUL
787             projects:
788                 - name: 'apex-verify-iso-{{ stream }}'
789                   current-parameters: false
790                   predefined-parameters: |
791                     BUILD_DIRECTORY=$WORKSPACE/../apex-build-{{ stream }}/.build
792                     GERRIT_BRANCH=$GERRIT_BRANCH
793                     GERRIT_REFSPEC=
794                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
795                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
796                   node-parameters: true
797                   kill-phase-on: FAILURE
798                   abort-all-job: true
799                   git-revision: true
800         - multijob:
801             name: Baremetal Deploy and Test Phase
802             condition: SUCCESSFUL
803             projects:
804 {% for scenario in scenarios[stream] %}
805                 - name: 'apex-{{ scenario }}-baremetal-{{ stream }}'
806                   node-parameters: false
807                   current-parameters: false
808                   predefined-parameters: |
809                     OPNFV_CLEAN=yes
810                   kill-phase-on: NEVER
811                   abort-all-job: true
812                   git-revision: false
813 {% endfor %}
814 {% endfor %}
815
816 # snapshot create
817 - job-template:
818     name: 'apex-create-snapshot'
819
820     # Job template for clean
821     #
822     # Required Variables:
823     #     stream:    branch with - in place of / (eg. stable)
824
825     disabled: false
826
827     builders:
828         - shell:
829             !include-raw-escape: ./apex-snapshot-create.sh
830
831 # snapshot upload
832 - job-template:
833     name: 'apex-upload-snapshot'
834
835     # Job template for clean
836     #
837     # Required Variables:
838     #     stream:    branch with - in place of / (eg. stable)
839
840     disabled: false
841
842     builders:
843         - inject:
844            properties-content: ARTIFACT_TYPE=snapshot
845         - 'apex-upload-artifact'
846
847 # CSIT promote
848 - job-template:
849     name: 'apex-csit-promote-daily-{stream}'
850
851     # Job template for promoting CSIT Snapshots
852     #
853     # Required Variables:
854     #     stream:    branch with - in place of / (eg. stable)
855     #     branch:    branch (eg. stable)
856     node: '{virtual-slave}'
857     project-type: 'multijob'
858     disabled: false
859
860     scm:
861         - git-scm
862
863     parameters:
864         - project-parameter:
865             project: '{project}'
866             branch: '{branch}'
867         - apex-parameter:
868             gs-pathname: '{gs-pathname}'
869
870     properties:
871         - build-blocker:
872             use-build-blocker: true
873             block-level: 'NODE'
874             blocking-jobs:
875                 - 'apex-verify.*'
876                 - 'apex-deploy.*'
877                 - 'apex-runner.*'
878                 - 'apex-daily.*'
879
880     triggers:
881         - timed: '0 12 * * 0'
882
883     builders:
884         - multijob:
885             name: build
886             condition: SUCCESSFUL
887             projects:
888                 - name: 'apex-build-{stream}'
889                   current-parameters: false
890                   predefined-parameters: |
891                     GERRIT_BRANCH=$GERRIT_BRANCH
892                     GERRIT_REFSPEC=$GERRIT_REFSPEC
893                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
894                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
895                   node-parameters: false
896                   kill-phase-on: FAILURE
897                   abort-all-job: true
898                   git-revision: true
899         - multijob:
900             name: deploy-virtual
901             condition: SUCCESSFUL
902             projects:
903                 - name: 'apex-deploy-virtual-{stream}'
904                   current-parameters: false
905                   predefined-parameters: |
906                     DEPLOY_SCENARIO=os-odl_l3-csit-noha
907                     OPNFV_CLEAN=yes
908                     GERRIT_BRANCH=$GERRIT_BRANCH
909                     GERRIT_REFSPEC=$GERRIT_REFSPEC
910                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
911                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
912                     PROMOTE=True
913                   node-parameters: true
914                   kill-phase-on: FAILURE
915                   abort-all-job: true
916                   git-revision: false
917         - multijob:
918             name: functest-smoke
919             condition: SUCCESSFUL
920             projects:
921               - name: 'functest-apex-virtual-suite-{stream}'
922                 current-parameters: false
923                 predefined-parameters: |
924                   DEPLOY_SCENARIO=os-odl_l3-nofeature-noha
925                   FUNCTEST_SUITE_NAME=tempest_smoke_serial
926                   GERRIT_BRANCH=$GERRIT_BRANCH
927                   GERRIT_REFSPEC=$GERRIT_REFSPEC
928                   GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
929                   GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
930                 node-parameters: true
931                 kill-phase-on: FAILURE
932                 abort-all-job: true
933                 git-revision: false
934         - multijob:
935             name: create snapshot
936             condition: SUCCESSFUL
937             projects:
938               - name: 'apex-create-snapshot'
939                 current-parameters: false
940                 predefined-parameters: |
941                   SNAP_TYPE=csit
942                 node-parameters: true
943                 kill-phase-on: FAILURE
944                 abort-all-job: true
945                 git-revision: false
946         - multijob:
947             name: upload snapshot
948             condition: SUCCESSFUL
949             projects:
950               - name: 'apex-upload-snapshot'
951                 current-parameters: false
952                 predefined-parameters: |
953                   SNAP_TYPE=csit
954                 node-parameters: true
955                 kill-phase-on: FAILURE
956                 abort-all-job: true
957                 git-revision: false
958
959 # FDIO promote
960 - job-template:
961     name: 'apex-fdio-promote-daily-{stream}'
962
963     # Job template for promoting CSIT Snapshots
964     #
965     # Required Variables:
966     #     stream:    branch with - in place of / (eg. stable)
967     #     branch:    branch (eg. stable)
968     node: '{virtual-slave}'
969     project-type: 'multijob'
970     disabled: false
971
972     scm:
973         - git-scm
974
975     parameters:
976         - project-parameter:
977             project: '{project}'
978             branch: '{branch}'
979         - apex-parameter:
980             gs-pathname: '{gs-pathname}'
981
982     properties:
983         - build-blocker:
984             use-build-blocker: true
985             block-level: 'NODE'
986             blocking-jobs:
987                 - 'apex-verify.*'
988                 - 'apex-deploy.*'
989                 - 'apex-runner.*'
990                 - 'apex-daily.*'
991
992     builders:
993         - multijob:
994             name: build
995             condition: SUCCESSFUL
996             projects:
997                 - name: 'apex-build-{stream}'
998                   current-parameters: false
999                   predefined-parameters: |
1000                     GERRIT_BRANCH=$GERRIT_BRANCH
1001                     GERRIT_REFSPEC=$GERRIT_REFSPEC
1002                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
1003                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
1004                   node-parameters: false
1005                   kill-phase-on: FAILURE
1006                   abort-all-job: true
1007                   git-revision: true
1008         - multijob:
1009             name: deploy-virtual
1010             condition: SUCCESSFUL
1011             projects:
1012                 - name: 'apex-deploy-virtual-{stream}'
1013                   current-parameters: false
1014                   predefined-parameters: |
1015                     DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha
1016                     OPNFV_CLEAN=yes
1017                     GERRIT_BRANCH=$GERRIT_BRANCH
1018                     GERRIT_REFSPEC=$GERRIT_REFSPEC
1019                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
1020                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
1021                     PROMOTE=True
1022                   node-parameters: true
1023                   kill-phase-on: FAILURE
1024                   abort-all-job: true
1025                   git-revision: false
1026         - multijob:
1027             name: create snapshot
1028             condition: SUCCESSFUL
1029             projects:
1030               - name: 'apex-create-snapshot'
1031                 current-parameters: false
1032                 predefined-parameters: |
1033                   SNAP_TYPE=fdio
1034                 node-parameters: true
1035                 kill-phase-on: FAILURE
1036                 abort-all-job: true
1037                 git-revision: false
1038         - multijob:
1039             name: upload snapshot
1040             condition: SUCCESSFUL
1041             projects:
1042               - name: 'apex-upload-snapshot'
1043                 current-parameters: false
1044                 predefined-parameters: |
1045                   SNAP_TYPE=fdio
1046                 node-parameters: true
1047                 kill-phase-on: FAILURE
1048                 abort-all-job: true
1049                 git-revision: false
1050
1051 ########################
1052 # parameter macros
1053 ########################
1054 - parameter:
1055     name: apex-parameter
1056     parameters:
1057         - string:
1058             name: ARTIFACT_NAME
1059             default: 'latest'
1060             description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
1061         - string:
1062             name: ARTIFACT_VERSION
1063             default: 'daily'
1064             description: "Artifact version type"
1065         - string:
1066             name: BUILD_DIRECTORY
1067             default: $WORKSPACE/.build
1068             description: "Directory where the build artifact will be located upon the completion of the build."
1069         - string:
1070             name: CACHE_DIRECTORY
1071             default: $HOME/opnfv/apex-cache{gs-pathname}
1072             description: "Directory where the cache to be used during the build is located."
1073         - string:
1074             name: GIT_BASE
1075             default: https://gerrit.opnfv.org/gerrit/$PROJECT
1076             description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
1077         - string:
1078             name: GS_PATHNAME
1079             default: '{gs-pathname}'
1080             description: "Version directory where opnfv artifacts are stored in gs repository"
1081         - string:
1082             name: GS_URL
1083             default: $GS_BASE{gs-pathname}
1084             description: "URL to Google Storage."
1085         - string:
1086             name: PROMOTE
1087             default: 'False'
1088             description: "Flag to know if we should promote/upload snapshot artifacts."
1089
1090 ########################
1091 # builder macros
1092 ########################
1093 - builder:
1094     name: 'apex-unit-test'
1095     builders:
1096         - shell:
1097             !include-raw: ./apex-unit-test.sh
1098
1099 - builder:
1100     name: 'apex-build'
1101     builders:
1102         - shell:
1103             !include-raw: ./apex-build.sh
1104
1105 - builder:
1106     name: 'apex-workspace-cleanup'
1107     builders:
1108         - shell:
1109             !include-raw: ./apex-workspace-cleanup.sh
1110
1111 - builder:
1112     name: 'apex-iso-verify'
1113     builders:
1114         - shell:
1115             !include-raw: ./apex-iso-verify.sh
1116
1117
1118 - builder:
1119     name: 'apex-upload-artifact'
1120     builders:
1121         - shell:
1122             !include-raw: ./apex-upload-artifact.sh
1123
1124 - builder:
1125     name: 'apex-download-artifact'
1126     builders:
1127         - shell:
1128             !include-raw: ./apex-download-artifact.sh
1129
1130 - builder:
1131     name: 'apex-deploy'
1132     builders:
1133         - shell:
1134             !include-raw: ./apex-deploy.sh
1135
1136 #######################
1137 # trigger macros
1138 ########################
1139 - trigger:
1140     name: 'apex-master'
1141     triggers:
1142         - timed: '0 12 * * *'
1143 - trigger:
1144     name: 'apex-danube'
1145     triggers:
1146         - timed: '0 3 1 1 7'
1147