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