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