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