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