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