Apex: allow 3 simultaneous builds per node
[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-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                 - 'apex-verify.*'
156         - throttle:
157             max-per-node: 3
158             max-total: 10
159             option: 'project'
160
161     builders:
162         - description-setter:
163             description: "Built on $NODE_NAME"
164         - multijob:
165             name: basic
166             condition: SUCCESSFUL
167             projects:
168                 - name: 'apex-verify-unit-tests-{stream}'
169                   current-parameters: false
170                   predefined-parameters: |
171                     GERRIT_BRANCH=$GERRIT_BRANCH
172                     GERRIT_REFSPEC=$GERRIT_REFSPEC
173                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
174                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
175                   node-parameters: false
176                   kill-phase-on: FAILURE
177                   abort-all-job: true
178                   git-revision: true
179         - multijob:
180             name: build
181             condition: SUCCESSFUL
182             projects:
183                 - name: 'apex-build-{stream}'
184                   current-parameters: false
185                   predefined-parameters: |
186                     ARTIFACT_VERSION=$ARTIFACT_VERSION
187                     GERRIT_BRANCH=$GERRIT_BRANCH
188                     GERRIT_REFSPEC=$GERRIT_REFSPEC
189                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
190                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
191                   node-parameters: false
192                   kill-phase-on: FAILURE
193                   abort-all-job: true
194                   git-revision: true
195         - multijob:
196             name: deploy-virtual
197             condition: SUCCESSFUL
198             projects:
199                 - name: 'apex-deploy-virtual-{stream}'
200                   current-parameters: false
201                   predefined-parameters: |
202                     ARTIFACT_VERSION=$ARTIFACT_VERSION
203                     DEPLOY_SCENARIO={verify-scenario}
204                     OPNFV_CLEAN=yes
205                     GERRIT_BRANCH=$GERRIT_BRANCH
206                     GERRIT_REFSPEC=$GERRIT_REFSPEC
207                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
208                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
209                   node-parameters: true
210                   kill-phase-on: FAILURE
211                   abort-all-job: true
212                   git-revision: true
213         - multijob:
214             name: functest-smoke
215             condition: SUCCESSFUL
216             projects:
217               - name: 'functest-apex-virtual-suite-{stream}'
218                 current-parameters: false
219                 predefined-parameters: |
220                   DEPLOY_SCENARIO={verify-scenario}
221                   FUNCTEST_SUITE_NAME=healthcheck
222                   GERRIT_BRANCH=$GERRIT_BRANCH
223                   GERRIT_REFSPEC=$GERRIT_REFSPEC
224                   GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
225                   GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
226                 node-parameters: true
227                 kill-phase-on: FAILURE
228                 abort-all-job: true
229                 git-revision: false
230
231 # Verify Scenario Gate
232 - job-template:
233     name: 'apex-verify-gate-{stream}'
234
235     node: '{virtual-slave}'
236
237     concurrent: true
238
239     project-type: 'multijob'
240
241     parameters:
242         - apex-parameter:
243             gs-pathname: '{gs-pathname}/dev'
244         - project-parameter:
245             project: '{project}'
246             branch: '{branch}'
247         - string:
248             name: GIT_BASE
249             default: https://gerrit.opnfv.org/gerrit/$PROJECT
250             description: "Used for overriding the GIT URL coming from parameters macro."
251         - string:
252             name: ARTIFACT_VERSION
253             default: dev
254             description: "Used for overriding the ARTIFACT_VERSION"
255
256     scm:
257         - git-scm-gerrit
258
259     triggers:
260         - gerrit:
261             server-name: 'gerrit.opnfv.org'
262             trigger-on:
263                 - comment-added-contains-event:
264                     comment-contains-value: '^Patch Set [0-9]+: Code-Review\+2.*start-gate-scenario:.*'
265             projects:
266               - project-compare-type: 'ANT'
267                 project-pattern: 'apex'
268                 branches:
269                   - branch-compare-type: 'ANT'
270                     branch-pattern: '**/{branch}'
271                 file-paths:
272                   - compare-type: ANT
273                     pattern: 'ci/**'
274                   - compare-type: ANT
275                     pattern: 'build/**'
276                   - compare-type: ANT
277                     pattern: 'lib/**'
278                   - compare-type: ANT
279                     pattern: 'config/**'
280
281     properties:
282         - logrotate-default
283         - build-blocker:
284             use-build-blocker: true
285             block-level: 'NODE'
286             blocking-jobs:
287                 - 'apex-daily.*'
288                 - 'apex-deploy.*'
289                 - 'apex-runner.*'
290                 - 'apex-verify.*'
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                     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: Functest
386             condition: ALWAYS
387             projects:
388                 - name: 'functest-apex-baremetal-daily-{stream}'
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: 90
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         - 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-deploy-test-baremetal-{stream}'
549
550     # Job template for daily build
551     #
552     # Required Variables:
553     #     stream:    branch with - in place of / (eg. stable)
554     #     branch:    branch (eg. stable)
555     project-type: 'multijob'
556
557     disabled: false
558
559     scm:
560         - git-scm
561
562     parameters:
563         - '{project}-defaults'
564         - '{project}-baremetal-{stream}-defaults'
565         - project-parameter:
566             project: '{project}'
567             branch: '{branch}'
568         - apex-parameter:
569             gs-pathname: '{gs-pathname}'
570         - string:
571             name: DEPLOY_SCENARIO
572             default: '{verify-scenario}'
573             description: "Scenario to deploy with."
574     properties:
575         - logrotate-default
576         - build-blocker:
577             use-build-blocker: true
578             block-level: 'NODE'
579             blocking-jobs:
580                 - 'apex-verify.*'
581                 - 'apex-deploy.*'
582                 - 'apex-runner.*'
583                 - 'apex-.*-promote.*'
584     builders:
585         - description-setter:
586             description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
587         - multijob:
588             name: 'Baremetal Deploy'
589             condition: ALWAYS
590             projects:
591                 - name: 'apex-deploy-baremetal-{stream}'
592                   node-parameters: true
593                   current-parameters: true
594                   predefined-parameters: |
595                     OPNFV_CLEAN=yes
596                   kill-phase-on: FAILURE
597                   abort-all-job: true
598                   git-revision: false
599         - multijob:
600             name: Functest
601             condition: ALWAYS
602             projects:
603                 - name: 'functest-apex-baremetal-daily-{stream}'
604                   node-parameters: true
605                   current-parameters: false
606                   predefined-parameters:
607                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
608                   kill-phase-on: NEVER
609                   abort-all-job: false
610                   git-revision: false
611         - multijob:
612             name: Yardstick
613             condition: ALWAYS
614             projects:
615                 - name: 'yardstick-apex-baremetal-daily-{stream}'
616                   node-parameters: true
617                   current-parameters: false
618                   predefined-parameters:
619                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
620                   kill-phase-on: NEVER
621                   abort-all-job: false
622                   git-revision: false
623
624 {% for stream in scenarios %}
625 # {{ stream }} Daily
626 - job-template:
627     name: 'apex-daily-{{ stream }}'
628
629     # Job template for daily build
630     #
631     # Required Variables:
632     #     stream:    branch with - in place of / (eg. stable)
633     #     branch:    branch (eg. stable)
634     project-type: 'multijob'
635
636     node: '{{ build_slave[stream] }}'
637
638     disabled: false
639
640     scm:
641         - git-scm
642
643     parameters:
644         - '{project}-defaults'
645         - '{project}-baremetal-{{ stream }}-defaults'
646         - project-parameter:
647             project: '{project}'
648             branch: '{{ branch[stream] }}'
649         - apex-parameter:
650             gs-pathname: '{{ gspathname[stream] }}'
651
652     properties:
653         - logrotate-default
654
655     triggers:
656         - 'apex-{{ stream }}'
657
658     builders:
659         - multijob:
660             name: build
661             condition: SUCCESSFUL
662             projects:
663                 - name: 'apex-build-{{ stream }}'
664                   current-parameters: false
665                   predefined-parameters: |
666                     GERRIT_BRANCH=$GERRIT_BRANCH
667                     GERRIT_REFSPEC=$GERRIT_REFSPEC
668                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
669                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
670                   node-parameters: true
671                   kill-phase-on: FAILURE
672                   abort-all-job: true
673                   git-revision: true
674         - multijob:
675             name: 'Verify and upload ISO'
676             condition: SUCCESSFUL
677             projects:
678                 - name: 'apex-verify-iso-{{ stream }}'
679                   current-parameters: false
680                   predefined-parameters: |
681                     BUILD_DIRECTORY=apex-build-{{ stream }}/.build
682                     GERRIT_BRANCH=$GERRIT_BRANCH
683                     GERRIT_REFSPEC=$GERRIT_REFSPEC
684                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
685                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
686                   node-parameters: true
687                   kill-phase-on: FAILURE
688                   abort-all-job: true
689                   git-revision: true
690         - multijob:
691             name: Baremetal Deploy and Test Phase
692             condition: SUCCESSFUL
693             projects:
694 {% for scenario in scenarios[stream] %}
695                 - name: 'apex-deploy-test-baremetal-{{ stream }}'
696                   node-parameters: false
697                   current-parameters: false
698                   predefined-parameters: |
699                     DEPLOY_SCENARIO={{scenario}}
700                     OPNFV_CLEAN=yes
701                   kill-phase-on: NEVER
702                   abort-all-job: true
703                   git-revision: false
704 {% endfor %}
705 {% endfor %}
706
707 # snapshot create
708 - job-template:
709     name: 'apex-create-snapshot'
710
711     # Job template for clean
712     #
713     # Required Variables:
714     #     stream:    branch with - in place of / (eg. stable)
715
716     disabled: false
717
718     builders:
719         - shell:
720             !include-raw-escape: ./apex-snapshot-create.sh
721
722 # snapshot upload
723 - job-template:
724     name: 'apex-upload-snapshot'
725
726     # Job template for clean
727     #
728     # Required Variables:
729     #     stream:    branch with - in place of / (eg. stable)
730
731     disabled: false
732
733     builders:
734         - inject:
735            properties-content: ARTIFACT_TYPE=snapshot
736         - 'apex-upload-artifact'
737
738 # CSIT promote
739 - job-template:
740     name: 'apex-csit-promote-daily-{stream}'
741
742     # Job template for promoting CSIT Snapshots
743     #
744     # Required Variables:
745     #     stream:    branch with - in place of / (eg. stable)
746     #     branch:    branch (eg. stable)
747     node: '{virtual-slave}'
748     project-type: 'multijob'
749     disabled: false
750
751     scm:
752         - git-scm
753
754     parameters:
755         - project-parameter:
756             project: '{project}'
757             branch: '{branch}'
758         - apex-parameter:
759             gs-pathname: '{gs-pathname}'
760
761     properties:
762         - build-blocker:
763             use-build-blocker: true
764             block-level: 'NODE'
765             blocking-jobs:
766                 - 'apex-verify.*'
767                 - 'apex-deploy.*'
768                 - 'apex-runner.*'
769                 - 'apex-daily.*'
770
771     triggers:
772         - timed: '0 12 * * 0'
773
774     builders:
775         - multijob:
776             name: build
777             condition: SUCCESSFUL
778             projects:
779                 - name: 'apex-build-{stream}'
780                   current-parameters: false
781                   predefined-parameters: |
782                     GERRIT_BRANCH=$GERRIT_BRANCH
783                     GERRIT_REFSPEC=$GERRIT_REFSPEC
784                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
785                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
786                   node-parameters: false
787                   kill-phase-on: FAILURE
788                   abort-all-job: true
789                   git-revision: true
790         - multijob:
791             name: deploy-virtual
792             condition: SUCCESSFUL
793             projects:
794                 - name: 'apex-deploy-virtual-{stream}'
795                   current-parameters: false
796                   predefined-parameters: |
797                     DEPLOY_SCENARIO=os-odl_l3-csit-noha
798                     OPNFV_CLEAN=yes
799                     GERRIT_BRANCH=$GERRIT_BRANCH
800                     GERRIT_REFSPEC=$GERRIT_REFSPEC
801                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
802                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
803                   node-parameters: true
804                   kill-phase-on: FAILURE
805                   abort-all-job: true
806                   git-revision: false
807         - multijob:
808             name: functest-smoke
809             condition: SUCCESSFUL
810             projects:
811               - name: 'functest-apex-virtual-suite-{stream}'
812                 current-parameters: false
813                 predefined-parameters: |
814                   DEPLOY_SCENARIO=os-odl_l3-nofeature-noha
815                   FUNCTEST_SUITE_NAME=tempest_smoke_serial
816                   GERRIT_BRANCH=$GERRIT_BRANCH
817                   GERRIT_REFSPEC=$GERRIT_REFSPEC
818                   GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
819                   GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
820                 node-parameters: true
821                 kill-phase-on: FAILURE
822                 abort-all-job: true
823                 git-revision: false
824         - multijob:
825             name: create snapshot
826             condition: SUCCESSFUL
827             projects:
828               - name: 'apex-create-snapshot'
829                 current-parameters: true
830                 node-parameters: true
831                 kill-phase-on: FAILURE
832                 abort-all-job: true
833                 git-revision: false
834         - multijob:
835             name: upload snapshot
836             condition: SUCCESSFUL
837             projects:
838               - name: 'apex-upload-snapshot'
839                 current-parameters: true
840                 node-parameters: true
841                 kill-phase-on: FAILURE
842                 abort-all-job: true
843                 git-revision: false
844
845 # FDIO promote
846 - job-template:
847     name: 'apex-fdio-promote-daily-{stream}'
848
849     # Job template for promoting CSIT Snapshots
850     #
851     # Required Variables:
852     #     stream:    branch with - in place of / (eg. stable)
853     #     branch:    branch (eg. stable)
854     node: '{virtual-slave}'
855     project-type: 'multijob'
856     disabled: false
857
858     scm:
859         - git-scm
860
861     parameters:
862         - project-parameter:
863             project: '{project}'
864             branch: '{branch}'
865         - apex-parameter:
866             gs-pathname: '{gs-pathname}'
867
868     properties:
869         - build-blocker:
870             use-build-blocker: true
871             block-level: 'NODE'
872             blocking-jobs:
873                 - 'apex-verify.*'
874                 - 'apex-deploy.*'
875                 - 'apex-runner.*'
876                 - 'apex-daily.*'
877
878     builders:
879         - multijob:
880             name: build
881             condition: SUCCESSFUL
882             projects:
883                 - name: 'apex-build-{stream}'
884                   current-parameters: false
885                   predefined-parameters: |
886                     GERRIT_BRANCH=$GERRIT_BRANCH
887                     GERRIT_REFSPEC=$GERRIT_REFSPEC
888                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
889                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
890                   node-parameters: false
891                   kill-phase-on: FAILURE
892                   abort-all-job: true
893                   git-revision: true
894         - multijob:
895             name: deploy-virtual
896             condition: SUCCESSFUL
897             projects:
898                 - name: 'apex-deploy-virtual-{stream}'
899                   current-parameters: false
900                   predefined-parameters: |
901                     DEPLOY_SCENARIO=os-odl_l2-netvirt_gbp_fdio-noha
902                     OPNFV_CLEAN=yes
903                     GERRIT_BRANCH=$GERRIT_BRANCH
904                     GERRIT_REFSPEC=$GERRIT_REFSPEC
905                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
906                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
907                   node-parameters: true
908                   kill-phase-on: FAILURE
909                   abort-all-job: true
910                   git-revision: false
911         - multijob:
912             name: create snapshot
913             condition: SUCCESSFUL
914             projects:
915               - name: 'apex-create-snapshot'
916                 current-parameters: true
917                 node-parameters: true
918                 kill-phase-on: FAILURE
919                 abort-all-job: true
920                 git-revision: false
921         - multijob:
922             name: upload snapshot
923             condition: SUCCESSFUL
924             projects:
925               - name: 'apex-upload-snapshot'
926                 current-parameters: true
927                 node-parameters: true
928                 kill-phase-on: FAILURE
929                 abort-all-job: true
930                 git-revision: false
931
932 - job-template:
933     name: 'apex-gs-clean-{stream}'
934
935     # Job template for clean
936     #
937     # Required Variables:
938     #     stream:    branch with - in place of / (eg. stable)
939     node: '{slave}'
940
941     disabled: false
942
943     parameters:
944         - project-parameter:
945             project: '{project}'
946             branch: '{branch}'
947         - apex-parameter:
948             gs-pathname: '{gs-pathname}'
949
950     builders:
951         - 'apex-gs-clean'
952
953     triggers:
954         - 'apex-gs-clean-{stream}'
955
956 ########################
957 # parameter macros
958 ########################
959 - parameter:
960     name: apex-parameter
961     parameters:
962         - string:
963             name: ARTIFACT_NAME
964             default: 'latest'
965             description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
966         - string:
967             name: ARTIFACT_VERSION
968             default: 'daily'
969             description: "Artifact version type"
970         - string:
971             name: BUILD_DIRECTORY
972             default: $WORKSPACE/.build
973             description: "Directory where the build artifact will be located upon the completion of the build."
974         - string:
975             name: CACHE_DIRECTORY
976             default: $HOME/opnfv/apex-cache{gs-pathname}
977             description: "Directory where the cache to be used during the build is located."
978         - string:
979             name: GIT_BASE
980             default: https://gerrit.opnfv.org/gerrit/$PROJECT
981             description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
982         - string:
983             name: GS_PATHNAME
984             default: '{gs-pathname}'
985             description: "Version directory where opnfv artifacts are stored in gs repository"
986         - string:
987             name: GS_URL
988             default: $GS_BASE{gs-pathname}
989             description: "URL to Google Storage."
990
991 ########################
992 # builder macros
993 ########################
994 - builder:
995     name: 'apex-unit-test'
996     builders:
997         - shell:
998             !include-raw: ./apex-unit-test.sh
999
1000 - builder:
1001     name: 'apex-build'
1002     builders:
1003         - shell:
1004             !include-raw: ./apex-build.sh
1005
1006 - builder:
1007     name: 'apex-workspace-cleanup'
1008     builders:
1009         - shell:
1010             !include-raw: ./apex-workspace-cleanup.sh
1011
1012 - builder:
1013     name: 'apex-iso-verify'
1014     builders:
1015         - shell:
1016             !include-raw: ./apex-iso-verify.sh
1017
1018
1019 - builder:
1020     name: 'apex-upload-artifact'
1021     builders:
1022         - shell:
1023             !include-raw: ./apex-upload-artifact.sh
1024
1025 - builder:
1026     name: 'apex-download-artifact'
1027     builders:
1028         - shell:
1029             !include-raw: ./apex-download-artifact.sh
1030
1031 - builder:
1032     name: 'apex-gs-cleanup'
1033     builders:
1034         - shell:
1035             !include-raw: ./apex-gs-cleanup.sh
1036
1037 - builder:
1038     name: 'apex-deploy'
1039     builders:
1040         - shell:
1041             !include-raw: ./apex-deploy.sh
1042
1043 #######################
1044 # trigger macros
1045 ########################
1046 - trigger:
1047     name: 'apex-master'
1048     triggers:
1049         - timed: '0 3 1 1 7'
1050 - trigger:
1051     name: 'apex-danube'
1052     triggers:
1053         - timed: '0 12 * * *'
1054 - trigger:
1055     name: 'apex-gs-clean-{stream}'
1056     triggers:
1057         - timed: '0 2 * * *'