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