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