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