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