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