Merge "Add auto-report to MongoDB"
[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-run-deploy-test-baremetal-{stream}'
17         - 'apex-upload-snapshot'
18         - 'apex-create-snapshot'
19     # stream:    branch with - in place of / (eg. stable-arno)
20     # branch:    branch (eg. stable/arno)
21     stream:
22         - master:
23             branch: 'master'
24             gs-pathname: ''
25             build-slave: 'apex-build-master'
26             virtual-slave: 'apex-virtual-master'
27             baremetal-slave: 'apex-baremetal-master'
28             verify-scenario: 'os-odl-nofeature-ha'
29
30         - danube:
31             branch: 'stable/danube'
32             gs-pathname: '/danube'
33             build-slave: 'apex-build-danube'
34             virtual-slave: 'apex-virtual-danube'
35             baremetal-slave: 'apex-baremetal-danube'
36             verify-scenario: 'os-odl_l3-nofeature-ha'
37             disabled: false
38
39     platform:
40          - 'baremetal'
41          - 'virtual'
42
43 # Unit Test
44 - job-template:
45     name: 'apex-verify-unit-tests-{stream}'
46
47     node: '{build-slave}'
48
49     concurrent: true
50
51     parameters:
52         - apex-parameter:
53             gs-pathname: '{gs-pathname}'
54         - project-parameter:
55             project: '{project}'
56             branch: '{branch}'
57
58     scm:
59         - git-scm-gerrit
60
61     triggers:
62         - gerrit:
63             server-name: 'gerrit.opnfv.org'
64             trigger-on:
65                 - patchset-created-event:
66                     exclude-drafts: 'false'
67                     exclude-trivial-rebase: 'false'
68                     exclude-no-code-change: 'true'
69                 - draft-published-event
70                 - comment-added-contains-event:
71                     comment-contains-value: 'recheck'
72                 - comment-added-contains-event:
73                     comment-contains-value: 'reverify'
74             projects:
75               - project-compare-type: 'ANT'
76                 project-pattern: 'apex'
77                 branches:
78                   - branch-compare-type: 'ANT'
79                     branch-pattern: '**/{branch}'
80                 file-paths:
81                   - compare-type: ANT
82                     pattern: 'tests/**'
83     properties:
84         - logrotate-default
85         - throttle:
86             max-per-node: 1
87             max-total: 10
88             option: 'project'
89
90     builders:
91         - shell:
92             !include-raw-escape: ./apex-unit-test.sh
93
94 # Verify
95 - job-template:
96     name: 'apex-verify-{stream}'
97
98     node: '{virtual-slave}'
99
100     concurrent: true
101
102     project-type: 'multijob'
103
104     parameters:
105         - apex-parameter:
106             gs-pathname: '{gs-pathname}/dev'
107         - project-parameter:
108             project: '{project}'
109             branch: '{branch}'
110         - string:
111             name: ARTIFACT_VERSION
112             default: dev
113             description: "Used for overriding the ARTIFACT_VERSION"
114     scm:
115         - git-scm-gerrit
116
117     triggers:
118         - gerrit:
119             server-name: 'gerrit.opnfv.org'
120             trigger-on:
121                 - patchset-created-event:
122                     exclude-drafts: 'false'
123                     exclude-trivial-rebase: 'false'
124                     exclude-no-code-change: 'true'
125                 - draft-published-event
126                 - comment-added-contains-event:
127                     comment-contains-value: 'recheck'
128                 - comment-added-contains-event:
129                     comment-contains-value: 'reverify'
130             projects:
131               - project-compare-type: 'ANT'
132                 project-pattern: 'apex'
133                 branches:
134                   - branch-compare-type: 'ANT'
135                     branch-pattern: '**/{branch}'
136                 file-paths:
137                   - compare-type: ANT
138                     pattern: 'ci/**'
139                   - compare-type: ANT
140                     pattern: 'build/**'
141                   - compare-type: ANT
142                     pattern: 'lib/**'
143                   - compare-type: ANT
144                     pattern: 'config/**'
145
146     properties:
147         - logrotate-default
148         - build-blocker:
149             use-build-blocker: true
150             block-level: 'NODE'
151             blocking-jobs:
152                 - 'apex-daily.*'
153                 - 'apex-deploy.*'
154                 - 'apex-runner.*'
155         - throttle:
156             max-per-node: 3
157             max-total: 10
158             option: 'project'
159
160     builders:
161         - description-setter:
162             description: "Built on $NODE_NAME"
163         - multijob:
164             name: basic
165             condition: SUCCESSFUL
166             projects:
167                 - name: 'apex-verify-unit-tests-{stream}'
168                   current-parameters: false
169                   predefined-parameters: |
170                     GERRIT_BRANCH=$GERRIT_BRANCH
171                     GERRIT_REFSPEC=$GERRIT_REFSPEC
172                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
173                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
174                   node-parameters: false
175                   kill-phase-on: FAILURE
176                   abort-all-job: true
177                   git-revision: true
178         - multijob:
179             name: build
180             condition: SUCCESSFUL
181             projects:
182                 - name: 'apex-build-{stream}'
183                   current-parameters: false
184                   predefined-parameters: |
185                     ARTIFACT_VERSION=$ARTIFACT_VERSION
186                     GERRIT_BRANCH=$GERRIT_BRANCH
187                     GERRIT_REFSPEC=$GERRIT_REFSPEC
188                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
189                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
190                   node-parameters: false
191                   kill-phase-on: FAILURE
192                   abort-all-job: true
193                   git-revision: true
194         - multijob:
195             name: deploy-virtual
196             condition: SUCCESSFUL
197             projects:
198                 - name: 'apex-deploy-virtual-{stream}'
199                   current-parameters: false
200                   predefined-parameters: |
201                     ARTIFACT_VERSION=$ARTIFACT_VERSION
202                     DEPLOY_SCENARIO={verify-scenario}
203                     OPNFV_CLEAN=yes
204                     GERRIT_BRANCH=$GERRIT_BRANCH
205                     GERRIT_REFSPEC=$GERRIT_REFSPEC
206                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
207                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
208                   node-parameters: true
209                   kill-phase-on: FAILURE
210                   abort-all-job: true
211                   git-revision: true
212 #        - multijob:
213 #            name: functest-smoke
214 #            condition: SUCCESSFUL
215 #            projects:
216 #              - name: 'functest-apex-virtual-suite-{stream}'
217 #                current-parameters: false
218 #                predefined-parameters: |
219 #                  DEPLOY_SCENARIO={verify-scenario}
220 #                  FUNCTEST_SUITE_NAME=healthcheck
221 #                  GERRIT_BRANCH=$GERRIT_BRANCH
222 #                  GERRIT_REFSPEC=$GERRIT_REFSPEC
223 #                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
224 #                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
225 #                node-parameters: true
226 #                kill-phase-on: FAILURE
227 #                abort-all-job: true
228 #                git-revision: false
229
230 # Verify Scenario Gate
231 - job-template:
232     name: 'apex-verify-gate-{stream}'
233
234     node: '{virtual-slave}'
235
236     concurrent: true
237
238     project-type: 'multijob'
239
240     parameters:
241         - apex-parameter:
242             gs-pathname: '{gs-pathname}/dev'
243         - project-parameter:
244             project: '{project}'
245             branch: '{branch}'
246         - string:
247             name: GIT_BASE
248             default: https://gerrit.opnfv.org/gerrit/$PROJECT
249             description: "Used for overriding the GIT URL coming from parameters macro."
250         - string:
251             name: ARTIFACT_VERSION
252             default: dev
253             description: "Used for overriding the ARTIFACT_VERSION"
254
255     scm:
256         - git-scm-gerrit
257
258     triggers:
259         - gerrit:
260             server-name: 'gerrit.opnfv.org'
261             trigger-on:
262                 - comment-added-contains-event:
263                     comment-contains-value: '^Patch Set [0-9]+: Code-Review\+2.*start-gate-scenario:.*'
264             projects:
265               - project-compare-type: 'ANT'
266                 project-pattern: 'apex'
267                 branches:
268                   - branch-compare-type: 'ANT'
269                     branch-pattern: '**/{branch}'
270                 file-paths:
271                   - compare-type: ANT
272                     pattern: 'ci/**'
273                   - compare-type: ANT
274                     pattern: 'build/**'
275                   - compare-type: ANT
276                     pattern: 'lib/**'
277                   - compare-type: ANT
278                     pattern: 'config/**'
279
280     properties:
281         - logrotate-default
282         - build-blocker:
283             use-build-blocker: true
284             block-level: 'NODE'
285             blocking-jobs:
286                 - 'apex-daily.*'
287                 - 'apex-deploy.*'
288                 - 'apex-runner.*'
289         - throttle:
290             max-per-node: 3
291             max-total: 10
292             option: 'project'
293
294     builders:
295         - multijob:
296             name: deploy-virtual
297             condition: SUCCESSFUL
298             projects:
299                 - name: 'apex-deploy-virtual-{stream}'
300                   current-parameters: false
301                   predefined-parameters: |
302                     ARTIFACT_VERSION=$ARTIFACT_VERSION
303                     DEPLOY_SCENARIO=gate
304                     OPNFV_CLEAN=yes
305                     GERRIT_BRANCH=$GERRIT_BRANCH
306                     GERRIT_REFSPEC=$GERRIT_REFSPEC
307                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
308                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
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: FAILURE
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: 3
432             max-total: 10
433             option: 'project'
434
435     builders:
436         - 'apex-build'
437         - inject:
438            properties-content: ARTIFACT_TYPE=rpm
439         - 'apex-upload-artifact'
440
441 # ISO verify job
442 - job-template:
443     name: 'apex-verify-iso-{stream}'
444
445     # Job template for builds
446     #
447     # Required Variables:
448     #     stream:    branch with - in place of / (eg. stable)
449     #     branch:    branch (eg. stable)
450     node: '{virtual-slave}'
451
452     disabled: false
453
454     concurrent: true
455
456     parameters:
457         - project-parameter:
458             project: '{project}'
459             branch: '{branch}'
460         - apex-parameter:
461             gs-pathname: '{gs-pathname}'
462         - string:
463             name: GIT_BASE
464             default: https://gerrit.opnfv.org/gerrit/$PROJECT
465             description: "Used for overriding the GIT URL coming from parameters macro."
466
467     scm:
468         - git-scm
469
470     properties:
471         - logrotate-default
472         - build-blocker:
473             use-build-blocker: true
474             block-level: 'NODE'
475             blocking-jobs:
476                 - 'apex-deploy.*'
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     # Job template for virtual deployment
493     #
494     # Required Variables:
495     #     stream:    branch with - in place of / (eg. stable)
496     #     branch:    branch (eg. stable)
497     node: 'apex-{platform}-{stream}'
498
499     concurrent: true
500
501     disabled: false
502
503     scm:
504         - git-scm-gerrit
505
506     wrappers:
507         - timeout:
508             timeout: 120
509             fail: true
510
511     parameters:
512         - project-parameter:
513             project: '{project}'
514             branch: '{branch}'
515         - apex-parameter:
516             gs-pathname: '{gs-pathname}'
517         - string:
518             name: DEPLOY_SCENARIO
519             default: '{verify-scenario}'
520             description: "Scenario to deploy with."
521         - string:
522             name: OPNFV_CLEAN
523             default: 'no'
524             description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment"
525
526     properties:
527         - logrotate-default
528         - build-blocker:
529             use-build-blocker: true
530             block-level: 'NODE'
531             blocking-jobs:
532                 - 'apex-deploy.*'
533                 - 'functest.*'
534                 - 'yardstick.*'
535         - throttle:
536             max-per-node: 1
537             max-total: 10
538             option: 'project'
539
540     builders:
541         - description-setter:
542             description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
543         - 'apex-download-artifact'
544         - 'apex-deploy'
545         - 'apex-workspace-cleanup'
546
547
548 # Baremetal Deploy and Test
549 - job-template:
550     name: 'apex-run-deploy-test-baremetal-{stream}'
551
552     # Job template for daily build
553     #
554     # Required Variables:
555     #     stream:    branch with - in place of / (eg. stable)
556     #     branch:    branch (eg. stable)
557     project-type: 'multijob'
558
559     disabled: false
560
561     scm:
562         - git-scm
563
564     parameters:
565         - '{project}-defaults'
566         - '{project}-baremetal-{stream}-defaults'
567         - project-parameter:
568             project: '{project}'
569             branch: '{branch}'
570         - apex-parameter:
571             gs-pathname: '{gs-pathname}'
572         - string:
573             name: DEPLOY_SCENARIO
574             default: '{verify-scenario}'
575             description: "Scenario to deploy with."
576     properties:
577         - logrotate-default
578         - build-blocker:
579             use-build-blocker: true
580             block-level: 'NODE'
581             blocking-jobs:
582                 - 'apex-verify.*'
583                 - 'apex-runner.*'
584                 - 'apex-.*-promote.*'
585                 - 'apex-run.*'
586     builders:
587         - description-setter:
588             description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
589         - multijob:
590             name: 'Baremetal Deploy'
591             condition: ALWAYS
592             projects:
593                 - name: 'apex-deploy-baremetal-{stream}'
594                   node-parameters: true
595                   current-parameters: true
596                   predefined-parameters: |
597                     OPNFV_CLEAN=yes
598                     GERRIT_BRANCH=$GERRIT_BRANCH
599                     GERRIT_REFSPEC=
600                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
601                   kill-phase-on: FAILURE
602                   abort-all-job: true
603                   git-revision: false
604         - multijob:
605             name: Functest
606             condition: ALWAYS
607             projects:
608                 - name: 'functest-apex-baremetal-daily-{stream}'
609                   node-parameters: true
610                   current-parameters: false
611                   predefined-parameters:
612                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
613                   kill-phase-on: NEVER
614                   abort-all-job: false
615                   git-revision: false
616         - multijob:
617             name: Yardstick
618             condition: ALWAYS
619             projects:
620                 - name: 'yardstick-apex-baremetal-daily-{stream}'
621                   node-parameters: true
622                   current-parameters: false
623                   predefined-parameters:
624                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
625                   kill-phase-on: NEVER
626                   abort-all-job: false
627                   git-revision: false
628
629 {% for stream in scenarios %}
630 # {{ stream }} Daily
631 - job-template:
632     name: 'apex-daily-{{ stream }}'
633
634     # Job template for daily build
635     #
636     # Required Variables:
637     #     stream:    branch with - in place of / (eg. stable)
638     #     branch:    branch (eg. stable)
639     project-type: 'multijob'
640
641     node: '{{ build_slave[stream] }}'
642
643     disabled: false
644
645     scm:
646         - git-scm
647
648     parameters:
649         - '{project}-defaults'
650         - '{project}-baremetal-{{ stream }}-defaults'
651         - project-parameter:
652             project: '{project}'
653             branch: '{{ branch[stream] }}'
654         - apex-parameter:
655             gs-pathname: '{{ gspathname[stream] }}'
656
657     properties:
658         - logrotate-default
659
660     triggers:
661         - 'apex-{{ stream }}'
662
663     builders:
664         - multijob:
665             name: build
666             condition: SUCCESSFUL
667             projects:
668                 - name: 'apex-build-{{ stream }}'
669                   current-parameters: false
670                   predefined-parameters: |
671                     GERRIT_BRANCH=$GERRIT_BRANCH
672                     GERRIT_REFSPEC=
673                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
674                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
675                   node-parameters: true
676                   kill-phase-on: FAILURE
677                   abort-all-job: true
678                   git-revision: true
679         - multijob:
680             name: 'Verify and upload ISO'
681             condition: SUCCESSFUL
682             projects:
683                 - name: 'apex-verify-iso-{{ stream }}'
684                   current-parameters: false
685                   predefined-parameters: |
686                     BUILD_DIRECTORY=$WORKSPACE/../apex-build-{{ stream }}/.build
687                     GERRIT_BRANCH=$GERRIT_BRANCH
688                     GERRIT_REFSPEC=
689                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
690                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
691                   node-parameters: true
692                   kill-phase-on: FAILURE
693                   abort-all-job: true
694                   git-revision: true
695         - multijob:
696             name: Baremetal Deploy and Test Phase
697             condition: SUCCESSFUL
698             projects:
699 {% for scenario in scenarios[stream] %}
700                 - name: 'apex-run-deploy-test-baremetal-{{ stream }}'
701                   node-parameters: false
702                   current-parameters: false
703                   predefined-parameters: |
704                     DEPLOY_SCENARIO={{scenario}}
705                     OPNFV_CLEAN=yes
706                   kill-phase-on: NEVER
707                   abort-all-job: true
708                   git-revision: false
709 {% endfor %}
710 {% endfor %}
711
712 # snapshot create
713 - job-template:
714     name: 'apex-create-snapshot'
715
716     # Job template for clean
717     #
718     # Required Variables:
719     #     stream:    branch with - in place of / (eg. stable)
720
721     disabled: false
722
723     builders:
724         - shell:
725             !include-raw-escape: ./apex-snapshot-create.sh
726
727 # snapshot upload
728 - job-template:
729     name: 'apex-upload-snapshot'
730
731     # Job template for clean
732     #
733     # Required Variables:
734     #     stream:    branch with - in place of / (eg. stable)
735
736     disabled: false
737
738     builders:
739         - inject:
740            properties-content: ARTIFACT_TYPE=snapshot
741         - 'apex-upload-artifact'
742
743 # CSIT promote
744 - job-template:
745     name: 'apex-csit-promote-daily-{stream}'
746
747     # Job template for promoting CSIT Snapshots
748     #
749     # Required Variables:
750     #     stream:    branch with - in place of / (eg. stable)
751     #     branch:    branch (eg. stable)
752     node: '{virtual-slave}'
753     project-type: 'multijob'
754     disabled: false
755
756     scm:
757         - git-scm
758
759     parameters:
760         - project-parameter:
761             project: '{project}'
762             branch: '{branch}'
763         - apex-parameter:
764             gs-pathname: '{gs-pathname}'
765
766     properties:
767         - build-blocker:
768             use-build-blocker: true
769             block-level: 'NODE'
770             blocking-jobs:
771                 - 'apex-verify.*'
772                 - 'apex-deploy.*'
773                 - 'apex-runner.*'
774                 - 'apex-daily.*'
775
776     triggers:
777         - timed: '0 12 * * 0'
778
779     builders:
780         - multijob:
781             name: build
782             condition: SUCCESSFUL
783             projects:
784                 - name: 'apex-build-{stream}'
785                   current-parameters: false
786                   predefined-parameters: |
787                     GERRIT_BRANCH=$GERRIT_BRANCH
788                     GERRIT_REFSPEC=$GERRIT_REFSPEC
789                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
790                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
791                   node-parameters: false
792                   kill-phase-on: FAILURE
793                   abort-all-job: true
794                   git-revision: true
795         - multijob:
796             name: deploy-virtual
797             condition: SUCCESSFUL
798             projects:
799                 - name: 'apex-deploy-virtual-{stream}'
800                   current-parameters: false
801                   predefined-parameters: |
802                     DEPLOY_SCENARIO=os-odl_l3-csit-noha
803                     OPNFV_CLEAN=yes
804                     GERRIT_BRANCH=$GERRIT_BRANCH
805                     GERRIT_REFSPEC=$GERRIT_REFSPEC
806                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
807                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
808                     PROMOTE=True
809                   node-parameters: true
810                   kill-phase-on: FAILURE
811                   abort-all-job: true
812                   git-revision: false
813         - multijob:
814             name: functest-smoke
815             condition: SUCCESSFUL
816             projects:
817               - name: 'functest-apex-virtual-suite-{stream}'
818                 current-parameters: false
819                 predefined-parameters: |
820                   DEPLOY_SCENARIO=os-odl_l3-nofeature-noha
821                   FUNCTEST_SUITE_NAME=tempest_smoke_serial
822                   GERRIT_BRANCH=$GERRIT_BRANCH
823                   GERRIT_REFSPEC=$GERRIT_REFSPEC
824                   GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
825                   GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
826                 node-parameters: true
827                 kill-phase-on: FAILURE
828                 abort-all-job: true
829                 git-revision: false
830         - multijob:
831             name: create snapshot
832             condition: SUCCESSFUL
833             projects:
834               - name: 'apex-create-snapshot'
835                 current-parameters: true
836                 node-parameters: true
837                 kill-phase-on: FAILURE
838                 abort-all-job: true
839                 git-revision: false
840         - multijob:
841             name: upload snapshot
842             condition: SUCCESSFUL
843             projects:
844               - name: 'apex-upload-snapshot'
845                 current-parameters: true
846                 node-parameters: true
847                 kill-phase-on: FAILURE
848                 abort-all-job: true
849                 git-revision: false
850
851 # FDIO promote
852 - job-template:
853     name: 'apex-fdio-promote-daily-{stream}'
854
855     # Job template for promoting CSIT Snapshots
856     #
857     # Required Variables:
858     #     stream:    branch with - in place of / (eg. stable)
859     #     branch:    branch (eg. stable)
860     node: '{virtual-slave}'
861     project-type: 'multijob'
862     disabled: false
863
864     scm:
865         - git-scm
866
867     parameters:
868         - project-parameter:
869             project: '{project}'
870             branch: '{branch}'
871         - apex-parameter:
872             gs-pathname: '{gs-pathname}'
873
874     properties:
875         - build-blocker:
876             use-build-blocker: true
877             block-level: 'NODE'
878             blocking-jobs:
879                 - 'apex-verify.*'
880                 - 'apex-deploy.*'
881                 - 'apex-runner.*'
882                 - 'apex-daily.*'
883
884     builders:
885         - multijob:
886             name: build
887             condition: SUCCESSFUL
888             projects:
889                 - name: 'apex-build-{stream}'
890                   current-parameters: false
891                   predefined-parameters: |
892                     GERRIT_BRANCH=$GERRIT_BRANCH
893                     GERRIT_REFSPEC=$GERRIT_REFSPEC
894                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
895                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
896                   node-parameters: false
897                   kill-phase-on: FAILURE
898                   abort-all-job: true
899                   git-revision: true
900         - multijob:
901             name: deploy-virtual
902             condition: SUCCESSFUL
903             projects:
904                 - name: 'apex-deploy-virtual-{stream}'
905                   current-parameters: false
906                   predefined-parameters: |
907                     DEPLOY_SCENARIO=os-odl_l2-netvirt_gbp_fdio-noha
908                     OPNFV_CLEAN=yes
909                     GERRIT_BRANCH=$GERRIT_BRANCH
910                     GERRIT_REFSPEC=$GERRIT_REFSPEC
911                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
912                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
913                     PROMOTE=True
914                   node-parameters: true
915                   kill-phase-on: FAILURE
916                   abort-all-job: true
917                   git-revision: false
918         - multijob:
919             name: create snapshot
920             condition: SUCCESSFUL
921             projects:
922               - name: 'apex-create-snapshot'
923                 current-parameters: true
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: true
934                 node-parameters: true
935                 kill-phase-on: FAILURE
936                 abort-all-job: true
937                 git-revision: false
938
939 ########################
940 # parameter macros
941 ########################
942 - parameter:
943     name: apex-parameter
944     parameters:
945         - string:
946             name: ARTIFACT_NAME
947             default: 'latest'
948             description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
949         - string:
950             name: ARTIFACT_VERSION
951             default: 'daily'
952             description: "Artifact version type"
953         - string:
954             name: BUILD_DIRECTORY
955             default: $WORKSPACE/.build
956             description: "Directory where the build artifact will be located upon the completion of the build."
957         - string:
958             name: CACHE_DIRECTORY
959             default: $HOME/opnfv/apex-cache{gs-pathname}
960             description: "Directory where the cache to be used during the build is located."
961         - string:
962             name: GIT_BASE
963             default: https://gerrit.opnfv.org/gerrit/$PROJECT
964             description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
965         - string:
966             name: GS_PATHNAME
967             default: '{gs-pathname}'
968             description: "Version directory where opnfv artifacts are stored in gs repository"
969         - string:
970             name: GS_URL
971             default: $GS_BASE{gs-pathname}
972             description: "URL to Google Storage."
973         - string:
974             name: PROMOTE
975             default: 'False'
976             description: "Flag to know if we should promote/upload snapshot artifacts."
977
978 ########################
979 # builder macros
980 ########################
981 - builder:
982     name: 'apex-unit-test'
983     builders:
984         - shell:
985             !include-raw: ./apex-unit-test.sh
986
987 - builder:
988     name: 'apex-build'
989     builders:
990         - shell:
991             !include-raw: ./apex-build.sh
992
993 - builder:
994     name: 'apex-workspace-cleanup'
995     builders:
996         - shell:
997             !include-raw: ./apex-workspace-cleanup.sh
998
999 - builder:
1000     name: 'apex-iso-verify'
1001     builders:
1002         - shell:
1003             !include-raw: ./apex-iso-verify.sh
1004
1005
1006 - builder:
1007     name: 'apex-upload-artifact'
1008     builders:
1009         - shell:
1010             !include-raw: ./apex-upload-artifact.sh
1011
1012 - builder:
1013     name: 'apex-download-artifact'
1014     builders:
1015         - shell:
1016             !include-raw: ./apex-download-artifact.sh
1017
1018 - builder:
1019     name: 'apex-deploy'
1020     builders:
1021         - shell:
1022             !include-raw: ./apex-deploy.sh
1023
1024 #######################
1025 # trigger macros
1026 ########################
1027 - trigger:
1028     name: 'apex-master'
1029     triggers:
1030         - timed: '0 3 1 1 7'
1031 - trigger:
1032     name: 'apex-danube'
1033     triggers:
1034         - timed: '0 12 * * *'
1035