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