Apex: fix daily scm and functest job blocking with deploy
[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-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         - throttle:
533             max-per-node: 1
534             max-total: 10
535             option: 'project'
536
537     builders:
538         - description-setter:
539             description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
540         - 'apex-download-artifact'
541         - 'apex-deploy'
542         - 'apex-workspace-cleanup'
543
544
545 # Baremetal Deploy and Test
546 - job-template:
547     name: 'apex-deploy-test-baremetal-{stream}'
548
549     # Job template for daily build
550     #
551     # Required Variables:
552     #     stream:    branch with - in place of / (eg. stable)
553     #     branch:    branch (eg. stable)
554     project-type: 'multijob'
555
556     disabled: false
557
558     scm:
559         - git-scm
560
561     parameters:
562         - '{project}-defaults'
563         - '{project}-baremetal-{stream}-defaults'
564         - project-parameter:
565             project: '{project}'
566             branch: '{branch}'
567         - apex-parameter:
568             gs-pathname: '{gs-pathname}'
569         - string:
570             name: DEPLOY_SCENARIO
571             default: '{verify-scenario}'
572             description: "Scenario to deploy with."
573     properties:
574         - logrotate-default
575         - build-blocker:
576             use-build-blocker: true
577             block-level: 'NODE'
578             blocking-jobs:
579                 - 'apex-verify.*'
580                 - 'apex-deploy.*'
581                 - 'apex-runner.*'
582                 - 'apex-.*-promote.*'
583     builders:
584         - description-setter:
585             description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
586         - multijob:
587             name: 'Baremetal Deploy'
588             condition: ALWAYS
589             projects:
590                 - name: 'apex-deploy-baremetal-{stream}'
591                   node-parameters: true
592                   current-parameters: true
593                   predefined-parameters: |
594                     OPNFV_CLEAN=yes
595                   kill-phase-on: FAILURE
596                   abort-all-job: true
597                   git-revision: false
598         - multijob:
599             name: Functest
600             condition: ALWAYS
601             projects:
602                 - name: 'functest-apex-baremetal-daily-{stream}'
603                   node-parameters: true
604                   current-parameters: false
605                   predefined-parameters:
606                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
607                   kill-phase-on: NEVER
608                   abort-all-job: false
609                   git-revision: false
610         - multijob:
611             name: Yardstick
612             condition: ALWAYS
613             projects:
614                 - name: 'yardstick-apex-baremetal-daily-{stream}'
615                   node-parameters: true
616                   current-parameters: false
617                   predefined-parameters:
618                     DEPLOY_SCENARIO=$DEPLOY_SCENARIO
619                   kill-phase-on: NEVER
620                   abort-all-job: false
621                   git-revision: false
622
623 {% for stream in scenarios %}
624 # {{ stream }} Daily
625 - job-template:
626     name: 'apex-daily-{{ stream }}'
627
628     # Job template for daily build
629     #
630     # Required Variables:
631     #     stream:    branch with - in place of / (eg. stable)
632     #     branch:    branch (eg. stable)
633     project-type: 'multijob'
634
635     node: '{{ build_slave[stream] }}'
636
637     disabled: false
638
639     scm:
640         - git-scm-gerrit
641
642     parameters:
643         - '{project}-defaults'
644         - '{project}-baremetal-{{ stream }}-defaults'
645         - project-parameter:
646             project: '{project}'
647             branch: '{{ branch[stream] }}'
648         - apex-parameter:
649             gs-pathname: '{{ gspathname[stream] }}'
650
651     properties:
652         - logrotate-default
653
654     triggers:
655         - 'apex-{{ stream }}'
656
657     builders:
658         - multijob:
659             name: build
660             condition: SUCCESSFUL
661             projects:
662                 - name: 'apex-build-{{ stream }}'
663                   current-parameters: false
664                   predefined-parameters: |
665                     GERRIT_BRANCH=$GERRIT_BRANCH
666                     GERRIT_REFSPEC=$GERRIT_REFSPEC
667                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
668                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
669                   node-parameters: true
670                   kill-phase-on: FAILURE
671                   abort-all-job: true
672                   git-revision: true
673         - multijob:
674             name: 'Verify and upload ISO'
675             condition: SUCCESSFUL
676             projects:
677                 - name: 'apex-verify-iso-{{ stream }}'
678                   current-parameters: false
679                   predefined-parameters: |
680                     BUILD_DIRECTORY=apex-build-{{ stream }}/.build
681                     GERRIT_BRANCH=$GERRIT_BRANCH
682                     GERRIT_REFSPEC=$GERRIT_REFSPEC
683                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
684                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
685                   node-parameters: true
686                   kill-phase-on: FAILURE
687                   abort-all-job: true
688                   git-revision: true
689         - multijob:
690             name: Baremetal Deploy and Test Phase
691             condition: SUCCESSFUL
692             projects:
693 {% for scenario in scenarios[stream] %}
694                 - name: 'apex-deploy-test-baremetal-{{ stream }}'
695                   node-parameters: false
696                   current-parameters: false
697                   predefined-parameters: |
698                     DEPLOY_SCENARIO={{scenario}}
699                     OPNFV_CLEAN=yes
700                   kill-phase-on: NEVER
701                   abort-all-job: true
702                   git-revision: false
703 {% endfor %}
704 {% endfor %}
705
706 # snapshot create
707 - job-template:
708     name: 'apex-create-snapshot'
709
710     # Job template for clean
711     #
712     # Required Variables:
713     #     stream:    branch with - in place of / (eg. stable)
714
715     disabled: false
716
717     builders:
718         - shell:
719             !include-raw-escape: ./apex-snapshot-create.sh
720
721 # snapshot upload
722 - job-template:
723     name: 'apex-upload-snapshot'
724
725     # Job template for clean
726     #
727     # Required Variables:
728     #     stream:    branch with - in place of / (eg. stable)
729
730     disabled: false
731
732     builders:
733         - inject:
734            properties-content: ARTIFACT_TYPE=snapshot
735         - 'apex-upload-artifact'
736
737 # CSIT promote
738 - job-template:
739     name: 'apex-csit-promote-daily-{stream}'
740
741     # Job template for promoting CSIT Snapshots
742     #
743     # Required Variables:
744     #     stream:    branch with - in place of / (eg. stable)
745     #     branch:    branch (eg. stable)
746     node: '{virtual-slave}'
747     project-type: 'multijob'
748     disabled: false
749
750     scm:
751         - git-scm
752
753     parameters:
754         - project-parameter:
755             project: '{project}'
756             branch: '{branch}'
757         - apex-parameter:
758             gs-pathname: '{gs-pathname}'
759
760     properties:
761         - build-blocker:
762             use-build-blocker: true
763             block-level: 'NODE'
764             blocking-jobs:
765                 - 'apex-verify.*'
766                 - 'apex-deploy.*'
767                 - 'apex-runner.*'
768                 - 'apex-daily.*'
769
770     triggers:
771         - timed: '0 12 * * 0'
772
773     builders:
774         - multijob:
775             name: build
776             condition: SUCCESSFUL
777             projects:
778                 - name: 'apex-build-{stream}'
779                   current-parameters: false
780                   predefined-parameters: |
781                     GERRIT_BRANCH=$GERRIT_BRANCH
782                     GERRIT_REFSPEC=$GERRIT_REFSPEC
783                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
784                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
785                   node-parameters: false
786                   kill-phase-on: FAILURE
787                   abort-all-job: true
788                   git-revision: true
789         - multijob:
790             name: deploy-virtual
791             condition: SUCCESSFUL
792             projects:
793                 - name: 'apex-deploy-virtual-{stream}'
794                   current-parameters: false
795                   predefined-parameters: |
796                     DEPLOY_SCENARIO=os-odl_l3-csit-noha
797                     OPNFV_CLEAN=yes
798                     GERRIT_BRANCH=$GERRIT_BRANCH
799                     GERRIT_REFSPEC=$GERRIT_REFSPEC
800                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
801                     GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
802                   node-parameters: true
803                   kill-phase-on: FAILURE
804                   abort-all-job: true
805                   git-revision: false
806         - multijob:
807             name: functest-smoke
808             condition: SUCCESSFUL
809             projects:
810               - name: 'functest-apex-virtual-suite-{stream}'
811                 current-parameters: false
812                 predefined-parameters: |
813                   DEPLOY_SCENARIO=os-odl_l3-nofeature-noha
814                   FUNCTEST_SUITE_NAME=tempest_smoke_serial
815                   GERRIT_BRANCH=$GERRIT_BRANCH
816                   GERRIT_REFSPEC=$GERRIT_REFSPEC
817                   GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
818                   GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
819                 node-parameters: true
820                 kill-phase-on: FAILURE
821                 abort-all-job: true
822                 git-revision: false
823         - multijob:
824             name: create snapshot
825             condition: SUCCESSFUL
826             projects:
827               - name: 'apex-create-snapshot'
828                 current-parameters: true
829                 node-parameters: true
830                 kill-phase-on: FAILURE
831                 abort-all-job: true
832                 git-revision: false
833         - multijob:
834             name: upload snapshot
835             condition: SUCCESSFUL
836             projects:
837               - name: 'apex-upload-snapshot'
838                 current-parameters: true
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_l2-netvirt_gbp_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                   node-parameters: true
907                   kill-phase-on: FAILURE
908                   abort-all-job: true
909                   git-revision: false
910         - multijob:
911             name: create snapshot
912             condition: SUCCESSFUL
913             projects:
914               - name: 'apex-create-snapshot'
915                 current-parameters: true
916                 node-parameters: true
917                 kill-phase-on: FAILURE
918                 abort-all-job: true
919                 git-revision: false
920         - multijob:
921             name: upload snapshot
922             condition: SUCCESSFUL
923             projects:
924               - name: 'apex-upload-snapshot'
925                 current-parameters: true
926                 node-parameters: true
927                 kill-phase-on: FAILURE
928                 abort-all-job: true
929                 git-revision: false
930
931 - job-template:
932     name: 'apex-gs-clean-{stream}'
933
934     # Job template for clean
935     #
936     # Required Variables:
937     #     stream:    branch with - in place of / (eg. stable)
938     node: '{slave}'
939
940     disabled: false
941
942     parameters:
943         - project-parameter:
944             project: '{project}'
945             branch: '{branch}'
946         - apex-parameter:
947             gs-pathname: '{gs-pathname}'
948
949     builders:
950         - 'apex-gs-clean'
951
952     triggers:
953         - 'apex-gs-clean-{stream}'
954
955 ########################
956 # parameter macros
957 ########################
958 - parameter:
959     name: apex-parameter
960     parameters:
961         - string:
962             name: ARTIFACT_NAME
963             default: 'latest'
964             description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
965         - string:
966             name: ARTIFACT_VERSION
967             default: 'daily'
968             description: "Artifact version type"
969         - string:
970             name: BUILD_DIRECTORY
971             default: $WORKSPACE/.build
972             description: "Directory where the build artifact will be located upon the completion of the build."
973         - string:
974             name: CACHE_DIRECTORY
975             default: $HOME/opnfv/apex-cache{gs-pathname}
976             description: "Directory where the cache to be used during the build is located."
977         - string:
978             name: GIT_BASE
979             default: https://gerrit.opnfv.org/gerrit/$PROJECT
980             description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
981         - string:
982             name: GS_PATHNAME
983             default: '{gs-pathname}'
984             description: "Version directory where opnfv artifacts are stored in gs repository"
985         - string:
986             name: GS_URL
987             default: $GS_BASE{gs-pathname}
988             description: "URL to Google Storage."
989
990 ########################
991 # builder macros
992 ########################
993 - builder:
994     name: 'apex-unit-test'
995     builders:
996         - shell:
997             !include-raw: ./apex-unit-test.sh
998
999 - builder:
1000     name: 'apex-build'
1001     builders:
1002         - shell:
1003             !include-raw: ./apex-build.sh
1004
1005 - builder:
1006     name: 'apex-workspace-cleanup'
1007     builders:
1008         - shell:
1009             !include-raw: ./apex-workspace-cleanup.sh
1010
1011 - builder:
1012     name: 'apex-iso-verify'
1013     builders:
1014         - shell:
1015             !include-raw: ./apex-iso-verify.sh
1016
1017
1018 - builder:
1019     name: 'apex-upload-artifact'
1020     builders:
1021         - shell:
1022             !include-raw: ./apex-upload-artifact.sh
1023
1024 - builder:
1025     name: 'apex-download-artifact'
1026     builders:
1027         - shell:
1028             !include-raw: ./apex-download-artifact.sh
1029
1030 - builder:
1031     name: 'apex-gs-cleanup'
1032     builders:
1033         - shell:
1034             !include-raw: ./apex-gs-cleanup.sh
1035
1036 - builder:
1037     name: 'apex-deploy'
1038     builders:
1039         - shell:
1040             !include-raw: ./apex-deploy.sh
1041
1042 #######################
1043 # trigger macros
1044 ########################
1045 - trigger:
1046     name: 'apex-master'
1047     triggers:
1048         - timed: '0 3 1 1 7'
1049 - trigger:
1050     name: 'apex-danube'
1051     triggers:
1052         - timed: '0 12 * * *'
1053 - trigger:
1054     name: 'apex-gs-clean-{stream}'
1055     triggers:
1056         - timed: '0 2 * * *'