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