2f015d4b83eaa6d9e06de759104015bb38710d85
[ci-management.git] / jjb / vpp / vpp.yaml
1 # Copyright (c) 2021 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 ---
15 # PROJECT DEFINITIONS
16 #
17 # Please keep projects grouped in this order:
18 #     vpp-x86_64, vpp-aarch64, vpp-csit
19 #
20 # NOTES:
21 #   - The 'branch-refspec' attribute is used for sandbox testing.
22 #         Use the get_gerrit_refspec() bash function in
23 #         .../ci-management/extras/bash/sandbox_test_functions.sh
24 #         to query gerrit for the refspec of HEAD in a branch.
25 #         TODO: see if there is a refspec that works without requiring
26 #               use of get_gerrit_refspec and hand entering the result
27 #               in the WebUI 'Build With Parameters' gerrit refspec field.
28 # [end] NOTES
29
30 # VPP-CHECKSTYLE-X86_64 PROJECT
31 - project:
32     name: vpp-checkstyle-x86_64
33     jobs:
34       - 'vpp-checkstyle-verify-{stream}-{os}-{executor-arch}'
35     project: 'vpp'
36     stream:
37       - master:
38           branch: 'master'
39           branch-refspec: ''
40           os: 'ubuntu2004'
41           repo-stream-part: 'master'
42       - '2009':
43           branch: 'stable/2009'
44           branch-refspec: ''
45           os: 'ubuntu1804'
46           repo-stream-part: 'stable.2009'
47           os: 'ubuntu1804'
48       - '2101':
49           branch: 'stable/2101'
50           branch-refspec: ''
51           os: 'ubuntu1804'
52           repo-stream-part: 'stable.2101'
53     executor-arch: 'x86_64'
54 # [end] VPP-CHECKSTYLE-X86_64 PROJECT
55
56 # VPP-X86_64 PROJECT
57 #
58 # NOTE: The list of supported branches for each OS are maintained
59 #       in .../ci-management/docker/scripts/lib_vpp.sh
60 #       The job configuration must be derived from that list, thus
61 #       modifications to both should be made at the same time.
62 #       Since x86_64 is the primary development architecture, this
63 #       project definition should be identical to the docker image
64 #       build scripts.  Other architectures may be a subset.
65 - project:
66     name: vpp-x86_64
67     jobs:
68       - 'vpp-verify-{stream}-{os}-{executor-arch}'
69       - 'vpp-merge-{stream}-{os}-{executor-arch}'
70     project: 'vpp'
71     make-parallel-jobs: '4'
72     make-test-os: 'ubuntu-20.04'
73     archive-artifacts: '/tmp/vpp-failed-unittests/*/*'
74     stream:
75       - master:
76           branch: 'master'
77           branch-refspec: ''
78           repo-stream-part: 'master'
79       - '2009':
80           branch: 'stable/2009'
81           branch-refspec: ''
82           make-test-os: 'ubuntu-18.04'
83           repo-stream-part: 'stable.2009'
84       - '2101':
85           branch: 'stable/2101'
86           branch-refspec: ''
87           make-test-os: 'ubuntu-18.04'
88           repo-stream-part: 'stable.2101'
89     os:
90       - centos7:
91           repo-os-part: 'centos7'
92       - centos8:
93           repo-os-part: 'centos8'
94       - debian9:
95           repo-os-part: 'stretch'
96       - debian10:
97           repo-os-part: 'buster'
98       - ubuntu1804:
99           repo-os-part: 'ubuntu.bionic.main'
100       - ubuntu2004:
101           repo-os-part: 'ubuntu.focal.main'
102     executor-arch: 'x86_64'
103     exclude:
104       # OS deprecated in master
105       - stream: 'master'
106         os: 'centos7'
107       - stream: 'master'
108         os: 'debian9'
109       # 2009 LTS supports all OS variants
110       # OS deprecated in 2101
111       - stream: '2101'
112         os: 'centos7'
113       - stream: '2101'
114         os: 'debian9'
115 # [end] VPP-X86_64 PROJECT
116
117 # VPP-DEBUG-X86_64 PROJECT
118 #
119 # Currently a periodic job due to intermittent failures.
120 # Limiting branches to master and 2009, since other branches
121 # may not get fixes for the intermittent failures.
122 #
123 - project:
124     name: vpp-debug-x86_64
125     jobs:
126       - 'vpp-debug-verify-{stream}-{os}-{executor-arch}'
127     project: 'vpp'
128     make-parallel-jobs: '4'
129     make-test-os: 'ubuntu-20.04'
130     archive-artifacts: '/tmp/vpp-failed-unittests/*/*'
131     comment-trigger-value: 'debug-verify'
132     stream:
133       - master:
134           branch: 'master'
135           branch-refspec: ''
136           # Once per hour
137           periodicity: 'H * * * *'
138           repo-stream-part: 'master'
139       - '2009':
140           branch: 'stable/2009'
141           branch-refspec: ''
142           make-test-os: 'ubuntu-18.04'
143           # Once per day
144           periodicity: 'H H * * *'
145           repo-stream-part: 'stable.2009'
146     os:
147       - ubuntu2004:
148           repo-os-part: 'ubuntu.focal.main'
149     executor-arch: 'x86_64'
150 # [end] VPP-DEBUG-X86_64 PROJECT
151
152 # VPP-GCC-X86_64 PROJECT
153 - project:
154     name: vpp-gcc-x86_64
155     jobs:
156       - 'vpp-gcc-verify-{stream}-{os}-{executor-arch}'
157     project: 'vpp'
158     executor-arch: 'x86_64'
159     os:
160       - ubuntu2004:
161           repo-os-part: 'ubuntu.focal.main'
162     stream:
163       - master:
164           branch: 'master'
165           branch-refspec: ''
166           repo-stream-part: 'master'
167       - '2009':
168           branch: 'stable/2009'
169           branch-refspec: ''
170           repo-stream-part: 'stable.2009'
171       - '2101':
172           branch: 'stable/2101'
173           branch-refspec: ''
174           repo-stream-part: 'stable.2101'
175 # [end] VPP-GCC-X86_64 PROJECT
176
177 # VPP-AARCH64 PROJECT
178 #
179 # NOTE: The list of supported branches for each OS are maintained
180 #       in .../ci-management/docker/scripts/lib_vpp.sh
181 #       The job configuration must be derived from that list, thus
182 #       modifications to both should be made at the same time.
183 #       The AARCH64 architecture is in the process of catching up
184 #       with X86_64 in terms of OS coverage.  Thus the jobs are
185 #       a subset of those defined in the docker image build script.
186 - project:
187     name: vpp-aarch64
188     jobs:
189       - 'vpp-verify-{stream}-{os}-{executor-arch}'
190       - 'vpp-merge-{stream}-{os}-{executor-arch}'
191     project: 'vpp'
192     make-parallel-jobs: '16'
193     make-test-os: 'ubuntu-20.04'
194     archive-artifacts: '/tmp/vpp-failed-unittests/*/*'
195     stream:
196       - master:
197           branch: 'master'
198           branch-refspec: ''
199           repo-stream-part: 'master'
200       - '2009':
201           branch: 'stable/2009'
202           branch-refspec: ''
203           make-test-os: 'ubuntu-18.04'
204           repo-stream-part: 'stable.2009'
205       - '2101':
206           branch: 'stable/2101'
207           branch-refspec: ''
208           make-test-os: 'ubuntu-18.04'
209           repo-stream-part: 'stable.2101'
210     os:
211       - centos8:
212           repo-os-part: 'centos8'
213       - ubuntu1804:
214           repo-os-part: 'ubuntu-arm.bionic.main'
215       - ubuntu2004:
216           repo-os-part: 'ubuntu.focal.main'
217     executor-arch: 'aarch64'
218     exclude:
219       # OS introduced after 2009
220       - stream: '2009'
221         os: 'centos8'
222       - stream: '2009'
223         os: 'ubuntu2004'
224       # OS introduced after 2101
225       - stream: '2101'
226         os: 'centos8'
227       - stream: '2101'
228         os: 'ubuntu2004'
229 # [end] VPP-AARCH64 PROJECT
230
231 # VPP-CSIT-VERIFY-DEVICE PROJECT
232 - project:
233     name: vpp-csit-verify-device
234     jobs:
235       - 'vpp-csit-verify-device-perpatch':
236           make-parallel-jobs: '32'
237           exclude:
238             - testbed-arch: '1n-tx2'
239       - 'vpp-csit-verify-device-periodic':
240           make-parallel-jobs: '32'
241           periodicity: 'H * * * *'
242           skip-vote: 'true'
243           comment-trigger-value: 'devicetest-periodic'
244           exclude:
245             - stream: '2009'
246             - stream: '2101'
247             - testbed-arch: '1n-skx'
248     project: 'vpp'
249     skip-vote: 'false'
250     stream:
251       - master:
252           branch: 'master'
253           branch-refspec: ''
254           repo-stream-part: 'master'
255       - '2009':
256           branch: 'stable/2009'
257           branch-refspec: ''
258           repo-stream-part: 'stable.2009'
259       - '2101':
260           branch: 'stable/2101'
261           branch-refspec: ''
262           repo-stream-part: 'stable.2101'
263     testbed-arch:
264       - 1n-skx:
265           os: 'ubuntu2004'
266           executor-arch: 'x86_64'
267       - 1n-tx2:
268           os: 'ubuntu2004'
269           executor-arch: 'aarch64'
270
271 # [end] VPP-CSIT-VERIFY-DEVICE PROJECT
272
273 # VPP-CSIT-VERIFY-PERF PROJECT
274 - project:
275     name: vpp-csit-verify-perf
276     jobs:
277       - 'vpp-csit-verify-perf-{stream}-{os}-{executor-arch}-{testbed-arch}'
278     project: 'vpp'
279     skip-vote: 'false'
280     stream:
281       - master:
282           branch: 'master'
283           branch-refspec: ''
284           repo-stream-part: 'master'
285       - '2009':
286           branch: 'stable/2009'
287           branch-refspec: ''
288           repo-stream-part: 'stable.2009'
289       - '2101':
290           branch: 'stable/2101'
291           branch-refspec: ''
292           repo-stream-part: 'stable.2101'
293     testbed-arch:
294       - 2n-clx:
295           os: 'ubuntu2004'
296           executor-arch: 'x86_64'
297       - 2n-skx:
298           os: 'ubuntu2004'
299           executor-arch: 'x86_64'
300       - 2n-zn2:
301           os: 'ubuntu2004'
302           executor-arch: 'x86_64'
303       - 3n-skx:
304           os: 'ubuntu2004'
305           executor-arch: 'x86_64'
306       - 3n-hsw:
307           os: 'ubuntu2004'
308           executor-arch: 'x86_64'
309       - 2n-dnv:
310           os: 'ubuntu2004'
311           executor-arch: 'x86_64'
312       - 3n-dnv:
313           os: 'ubuntu2004'
314           executor-arch: 'x86_64'
315       - 3n-tsh:
316           os: 'ubuntu2004'
317           executor-arch: 'aarch64'
318           make-parallel-jobs: '16'
319       - 2n-tx2:
320           os: 'ubuntu2004'
321           executor-arch: 'aarch64'
322           make-parallel-jobs: '16'
323
324 # [end] VPP-CSIT-VERIFY-PERF PROJECT
325
326 # VPP-CSIT-API-CRC PROJECT
327 #
328 # Only master and LTS branches are supported.
329 #
330 - project:
331     name: vpp-csit-api-crc
332     jobs:
333       - 'vpp-csit-verify-api-crc-{stream}-{os}-{executor-arch}'
334     project: 'vpp'
335     executor-arch: 'x86_64'
336     skip-vote: 'false'
337     stream:
338       - master:
339           branch: 'master'
340           branch-refspec: ''
341       - '2009':
342           branch: 'stable/2009'
343           branch-refspec: ''
344           repo-stream-part: 'stable.2009'
345       - '2101':
346           branch: 'stable/2101'
347           branch-refspec: ''
348           repo-stream-part: 'stable.2101'
349     os: ubuntu2004
350 # [end] VPP-CSIT-API-CRC PROJECT
351
352 # LF RELENG VPP PROJECTS
353 - project:
354     name: vpp-info
355     project-name: vpp
356     jobs:
357       - gerrit-info-yaml-verify
358     build-node: centos7-builder-2c-2g
359     project: vpp
360     branch: master
361
362 - project:
363     name: vpp-view
364     views:
365       - project-view
366     project-name: vpp
367 # [end] LF RELENG VPP PROJECTS
368 # [end] PROJECT DEFINITIONS
369
370 # JOB TEMPLATE DEFINITIONS
371 #
372 # Please keep job templates in the same order as they are referenced
373 # in the project definitions above.
374
375 # VPP-CHECKSTYLE-VERIFY JOB TEMPLATE
376 - job-template:
377     name: 'vpp-checkstyle-verify-{stream}-{os}-{executor-arch}'
378
379     project-type: freestyle
380     node: 'builder-{os}-prod-{executor-arch}'
381     concurrent: true
382
383     build-discarder:
384       daysToKeep: '{build-days-to-keep}'
385       numToKeep: '{build-num-to-keep}'
386       artifactDaysToKeep: '{build-artifact-days-to-keep}'
387       artifactNumToKeep: '{build-artifact-num-to-keep}'
388
389     # Please keep parameters in alphabetical order
390     parameters:
391       - gerrit-parameter:
392           branch: '{branch}'
393       - gerrit-refspec-parameter:
394           refspec: '{branch-refspec}'
395       - os-parameter:
396           os: '{os}'
397       - project-parameter:
398           project: '{project}'
399       - repo-name-parameter:
400           repo-name: '{repo-stream-part}.ubuntu.bionic.main'
401       - workspace-archive-artifacts-parameter:
402           artifacts: '{archive-artifacts}'
403
404     scm:
405       - gerrit-trigger-scm:
406           credentials-id: 'jenkins-gerrit-credentials'
407           refspec: '$GERRIT_REFSPEC'
408           choosing-strategy: 'gerrit'
409
410     wrappers:
411       - fdio-infra-wrappers:
412           build-timeout: '{build-timeout}'
413       - credentials-binding:
414           - text:
415               credential-id: VppApiCompatNotify
416               variable: SECRET_WEBEX_TEAMS_ACCESS_TOKEN
417
418     triggers:
419       - gerrit:
420           server-name: 'Primary'
421           trigger-on:
422             - patchset-created-event:
423                 exclude-drafts: 'true'
424                 exclude-trivial-rebase: 'false'
425                 exclude-no-code-change: 'false'
426             - draft-published-event
427             - comment-added-contains-event:
428                 comment-contains-value: 'checkstylecheck'
429             - comment-added-contains-event:
430                 comment-contains-value: 'docsonly'
431             - comment-added-contains-event:
432                 comment-contains-value: 'recheck'
433             - comment-added-contains-event:
434                 comment-contains-value: 'reverify'
435             # Following two are to cover missing functions of drafts
436             # going to review status
437             - comment-added-contains-event:
438                 comment-contains-value: 'runtest'
439             - comment-added-contains-event:
440                 comment-contains-value: 'This change is ready for review'
441           projects:
442             - project-compare-type: 'ANT'
443               project-pattern: '{project}'
444               branches:
445                 - branch-compare-type: 'ANT'
446                   branch-pattern: '**/{branch}'
447               file-paths:
448                 - compare-type: REG_EXP
449                   pattern: ^((?!\/COMMIT_MSG|docs|_abc|_def[\/\.]).)*$
450               forbidden-file-paths:
451                 - compare-type: REG_EXP
452                   pattern: .*docs\/.*
453                 - compare-type: REG_EXP
454                   pattern: .*extras\/emacs\/.*
455               disable-strict-forbidden-file-verification: 'true'
456           override-votes: true
457           gerrit-build-notbuilt-verified-value: 0
458           gerrit-build-successful-verified-value: 1
459           # yamllint disable-line rule:line-length
460           notbuilt-message: 'Automatic retry of failed jobs may be in process. A proper vote should be set when retry completes.'
461           # yamllint disable-line rule:line-length
462           failed-message: 'Checkstyle failed. No further verify jobs will be started.'
463           successful-message: 'checkstyle_success'
464           skip-vote:
465             successful: true
466             failed: false
467             unstable: false
468             notbuilt: false
469
470     builders:
471       - shell:
472           !include-raw-escape:
473           - ../scripts/setup_executor_env.sh
474       - shell:
475           !include-raw-escape:
476           - ../scripts/vpp/checkstyle.sh
477       - shell:
478           !include-raw-escape:
479           - ../scripts/vpp/test-checkstyle.sh
480       - shell:
481           !include-raw-escape:
482           - ../scripts/vpp/api-checkstyle.sh
483       - shell:
484           !include-raw-escape:
485           - ../scripts/vpp/commitmsg.sh
486
487     publishers:
488       - fdio-infra-publish
489
490 # [end] VPP-CHECKSTYLE-VERIFY JOB TEMPLATE
491
492 # VPP-VERIFY JOB TEMPLATE
493 - job-template:
494     name: 'vpp-verify-{stream}-{os}-{executor-arch}'
495
496     project-type: freestyle
497     node: 'builder-{os}-prod-{executor-arch}'
498     concurrent: true
499
500     build-discarder:
501       daysToKeep: '{build-days-to-keep}'
502       numToKeep: 100
503       artifactDaysToKeep: '{build-artifact-days-to-keep}'
504       artifactNumToKeep: '{build-artifact-num-to-keep}'
505
506     # Please keep parameters in alphabetical order
507     parameters:
508       - gerrit-parameter:
509           branch: '{branch}'
510       - gerrit-refspec-parameter:
511           refspec: '{branch-refspec}'
512       - make-parallel-jobs-parameter:
513           make-parallel-jobs: '{make-parallel-jobs}'
514       - make-test-os-parameter:
515           make-test-os: '{make-test-os}'
516       - os-parameter:
517           os: '{os}'
518       - project-parameter:
519           project: '{project}'
520       - repo-name-parameter:
521           repo-name: '{repo-stream-part}.{repo-os-part}'
522       - stream-parameter:
523           stream: '{stream}'
524       - workspace-archive-artifacts-parameter:
525           artifacts: '{archive-artifacts}'
526
527     scm:
528       - gerrit-trigger-scm:
529           credentials-id: 'jenkins-gerrit-credentials'
530           refspec: '$GERRIT_REFSPEC'
531           choosing-strategy: 'gerrit'
532
533     wrappers:
534       - fdio-infra-wrappers:
535           build-timeout: 120
536
537     triggers:
538       - gerrit-trigger-checkstyle:
539           name: '{project}'
540           branch: '{branch}'
541
542     builders:
543       - shell:
544           !include-raw-escape:
545           - ../scripts/setup_executor_env.sh
546       - shell:
547           !include-raw-escape:
548           - ../scripts/setup_vpp_ubuntu_docker_test.sh
549       - shell:
550           !include-raw-escape:
551           - ../scripts/setup_vpp_dpdk_dev_env.sh
552       - shell:
553           !include-raw-escape:
554           - ../scripts/vpp/build.sh
555
556     publishers:
557       - fdio-infra-publish
558 # [end] VPP-VERIFY JOB TEMPLATE
559
560 # VPP-DEBUG-VERIFY JOB TEMPLATE
561 - job-template:
562     name: 'vpp-debug-verify-{stream}-{os}-{executor-arch}'
563
564     project-type: freestyle
565     node: 'builder-{os}-prod-{executor-arch}'
566     concurrent: true
567
568     build-discarder:
569       daysToKeep: '{build-days-to-keep}'
570       numToKeep: '{build-num-to-keep}'
571       artifactDaysToKeep: '{build-artifact-days-to-keep}'
572       artifactNumToKeep: '{build-artifact-num-to-keep}'
573
574     # Please keep parameters in alphabetical order
575     parameters:
576       - gerrit-parameter:
577           branch: '{branch}'
578       - gerrit-refspec-parameter:
579           refspec: '{branch-refspec}'
580       - make-parallel-jobs-parameter:
581           make-parallel-jobs: '{make-parallel-jobs}'
582       - make-test-os-parameter:
583           make-test-os: '{make-test-os}'
584       - os-parameter:
585           os: 'ubuntu1804'
586       - project-parameter:
587           project: '{project}'
588       - repo-name-parameter:
589           repo-name: '{repo-stream-part}.ubuntu.bionic.main'
590       - stream-parameter:
591           stream: '{stream}'
592       - workspace-archive-artifacts-parameter:
593           artifacts: '{archive-artifacts}'
594
595     scm:
596       - gerrit-trigger-scm:
597           credentials-id: 'jenkins-gerrit-credentials'
598           refspec: '$GERRIT_REFSPEC'
599           choosing-strategy: 'gerrit'
600
601     wrappers:
602       - fdio-infra-wrappers:
603           build-timeout: '{build-timeout}'
604
605     triggers:
606       - timed: '{periodicity}'
607       - gerrit-trigger-manually-triggered:
608           comment-trigger-value: '{comment-trigger-value}'
609           name: '{project}'
610           branch: '{branch}'
611
612     builders:
613       - shell:
614           !include-raw-escape:
615           - ../scripts/setup_executor_env.sh
616       - shell:
617           !include-raw-escape:
618           - ../scripts/setup_vpp_ubuntu_docker_test.sh
619       - shell:
620           !include-raw-escape:
621           - ../scripts/setup_vpp_dpdk_dev_env.sh
622       - shell:
623           !include-raw-escape:
624           - ../scripts/vpp/debug-build.sh
625
626     publishers:
627       - fdio-infra-publish
628 # [end] VPP-DEBUG-VERIFY-PERIODIC JOB TEMPLATE
629
630 # VPP-MERGE JOB TEMPLATE
631 - job-template:
632     name: 'vpp-merge-{stream}-{os}-{executor-arch}'
633
634     project-type: freestyle
635     node: 'builder-{os}-prod-{executor-arch}'
636
637     build-discarder:
638       daysToKeep: '{build-days-to-keep}'
639       numToKeep: 100
640       artifactDaysToKeep: '{build-artifact-days-to-keep}'
641       artifactNumToKeep: '{build-artifact-num-to-keep}'
642
643     # Please keep parameters in alphabetical order
644     parameters:
645       - gerrit-parameter:
646           branch: '{branch}'
647       - make-parallel-jobs-parameter:
648           make-parallel-jobs: '{make-parallel-jobs}'
649       - make-test-os-parameter:
650           make-test-os: '{make-test-os}'
651       - os-parameter:
652           os: '{os}'
653       - project-parameter:
654           project: '{project}'
655       - repo-name-parameter:
656           repo-name: '{repo-stream-part}.{repo-os-part}'
657       - stream-parameter:
658           stream: '{stream}'
659       - workspace-archive-artifacts-parameter:
660           artifacts: '{archive-artifacts}'
661
662     scm:
663       - gerrit-trigger-scm:
664           credentials-id: 'jenkins-gerrit-credentials'
665           refspec: ''
666           choosing-strategy: 'default'
667
668     wrappers:
669       - fdio-infra-wrappers:
670           build-timeout: 120
671
672     triggers:
673       - gerrit-trigger-patch-merged:
674           name: '{project}'
675           branch: '{branch}'
676
677     builders:
678       - config-file-provider:
679           files:
680             - file-id: '.packagecloud'
681               target: '/root'
682       - config-file-provider:
683           files:
684             - file-id: 'packagecloud_api'
685               target: '/root'
686       - shell:
687           !include-raw-escape:
688           - ../scripts/setup_executor_env.sh
689       - shell:
690           !include-raw-escape:
691           - ../scripts/setup_vpp_ubuntu_docker_test.sh
692       - shell:
693           !include-raw-escape:
694           - ../scripts/setup_vpp_dpdk_dev_env.sh
695       - shell:
696           !include-raw-escape:
697           - ../scripts/vpp/build.sh
698
699       - provide-maven-settings:
700           settings-file: 'vpp-settings'
701           global-settings-file: 'global-settings'
702       - shell:
703           !include-raw-escape:
704           - ../scripts/packagecloud_push.sh
705
706     publishers:
707       - fdio-infra-publish
708 # [end] VPP-MERGE JOB TEMPLATE
709
710 # VPP-GCC-VERIFY JOB TEMPLATE
711 - job-template:
712     name: 'vpp-gcc-verify-{stream}-{os}-{executor-arch}'
713
714     project-type: freestyle
715     node: 'builder-{os}-prod-{executor-arch}'
716     concurrent: true
717
718     build-discarder:
719       daysToKeep: '{build-days-to-keep}'
720       numToKeep: 100
721       artifactDaysToKeep: '{build-artifact-days-to-keep}'
722       artifactNumToKeep: '{build-artifact-num-to-keep}'
723
724     # Please keep parameters in alphabetical order
725     parameters:
726       - gerrit-parameter:
727           branch: '{branch}'
728       - gerrit-refspec-parameter:
729           refspec: '{branch-refspec}'
730       - make-parallel-jobs-parameter:
731           make-parallel-jobs: '{make-parallel-jobs}'
732       - os-parameter:
733           os: '{os}'
734       - project-parameter:
735           project: '{project}'
736       - repo-name-parameter:
737           repo-name: '{repo-stream-part}.{repo-os-part}'
738       - stream-parameter:
739           stream: '{stream}'
740       - workspace-archive-artifacts-parameter:
741           artifacts: '{archive-artifacts}'
742
743     scm:
744       - gerrit-trigger-scm:
745           credentials-id: 'jenkins-gerrit-credentials'
746           refspec: '$GERRIT_REFSPEC'
747           choosing-strategy: 'gerrit'
748
749     wrappers:
750       - fdio-infra-wrappers:
751           build-timeout: 120
752
753     triggers:
754       - gerrit-trigger-checkstyle:
755           name: '{project}'
756           branch: '{branch}'
757
758     builders:
759       - shell:
760           !include-raw-escape:
761           - ../scripts/setup_executor_env.sh
762       - shell:
763           !include-raw-escape:
764           - ../scripts/setup_vpp_ubuntu_docker_test.sh
765       - shell:
766           !include-raw-escape:
767           - ../scripts/setup_vpp_dpdk_dev_env.sh
768       - shell:
769           !include-raw-escape:
770           - ../scripts/vpp/gcc-build.sh
771
772     publishers:
773       - fdio-infra-publish
774 # [end] VPP-GCC-VERIFY JOB TEMPLATE
775
776 # VPP-CSIT-VERIFY-DEVICE-PERIODIC JOB TEMPLATE
777 - job-template:
778     name: 'vpp-csit-verify-device-{stream}-{os}-{executor-arch}-{testbed-arch}'
779     id: 'vpp-csit-verify-device-periodic'
780     description: |
781       <ul>
782           <li>executor
783               <ul>
784                   <li>csit-builder-{os}-prod-{executor-arch}
785               </ul>
786           <li>testbed architecture
787               <ul>
788                   <li>{testbed-arch}
789               </ul>
790       </ul>
791
792     project-type: freestyle
793     node: 'csit-builder-{os}-prod-{executor-arch}'
794     concurrent: true
795     archive-artifacts: '**/csit_current/**/*.*'
796     latest-only: false
797
798     build-discarder:
799       daysToKeep: '{build-days-to-keep}'
800       numToKeep: 100
801       artifactDaysToKeep: '{build-artifact-days-to-keep}'
802       artifactNumToKeep: '{build-artifact-num-to-keep}'
803
804     # Please keep parameters in alphabetical order
805     parameters:
806       - archive-artifacts-parameter:
807           artifacts: '{archive-artifacts}'
808       - gerrit-csit-refspec-parameter
809       - gerrit-event-comment-text-parameter
810       - gerrit-event-type-parameter
811       - gerrit-parameter:
812           branch: '{branch}'
813       - gerrit-refspec-parameter:
814           refspec: '{branch-refspec}'
815       - make-parallel-jobs-parameter:
816           make-parallel-jobs: '{make-parallel-jobs}'
817       - os-parameter:
818           os: '{os}'
819       - project-parameter:
820           project: '{project}'
821       - repo-name-parameter:
822           repo-name: '{repo-stream-part}.ubuntu.bionic.main'
823       - stream-parameter:
824           stream: '{stream}'
825
826     scm:
827       - gerrit-trigger-scm:
828           credentials-id: 'jenkins-gerrit-credentials'
829           refspec: '$GERRIT_REFSPEC'
830           choosing-strategy: 'default'
831
832     wrappers:
833       - fdio-infra-wrappers:
834           build-timeout: '90'
835
836     triggers:
837       - timed: '{periodicity}'
838       - gerrit-trigger-manually-triggered:
839           comment-trigger-value: '{comment-trigger-value}'
840           name: '{project}'
841           branch: '{branch}'
842
843     builders:
844       - shell:
845           !include-raw-escape:
846           - ../scripts/setup_executor_env.sh
847       - shell:
848           !include-raw-escape:
849           - ../scripts/setup_vpp_ubuntu_docker_test.sh
850       - shell:
851           !include-raw-escape:
852           - ../scripts/setup_vpp_dpdk_dev_env.sh
853       - shell:
854           !include-raw-escape:
855           - ../scripts/vpp/csit-device.sh
856
857     publishers:
858       - robot-report:
859           output-path: 'archives'
860
861       - fdio-infra-publish
862 # [end] VPP-CSIT-VERIFY-DEVICE-PERIODIC JOB TEMPLATE
863
864 # VPP-CSIT-VERIFY-DEVICE-PERPATCH JOB TEMPLATE
865 - job-template:
866     name: 'vpp-csit-verify-device-{stream}-{os}-{executor-arch}-{testbed-arch}'
867     id: 'vpp-csit-verify-device-perpatch'
868     description: |
869       <ul>
870           <li>executor
871               <ul>
872                   <li>csit-builder-{os}-prod-{executor-arch}
873               </ul>
874           <li>testbed architecture
875               <ul>
876                   <li>{testbed-arch}
877               </ul>
878       </ul>
879
880     project-type: freestyle
881     node: 'csit-builder-{os}-prod-{executor-arch}'
882     concurrent: true
883     archive-artifacts: '**/csit_current/**/*.*'
884     latest-only: false
885
886     build-discarder:
887       daysToKeep: '{build-days-to-keep}'
888       numToKeep: 100
889       artifactDaysToKeep: '{build-artifact-days-to-keep}'
890       artifactNumToKeep: '{build-artifact-num-to-keep}'
891
892     # Please keep parameters in alphabetical order
893     parameters:
894       - archive-artifacts-parameter:
895           artifacts: '{archive-artifacts}'
896       - gerrit-csit-refspec-parameter
897       - gerrit-event-comment-text-parameter
898       - gerrit-event-type-parameter
899       - gerrit-parameter:
900           branch: '{branch}'
901       - gerrit-refspec-parameter:
902           refspec: '{branch-refspec}'
903       - make-parallel-jobs-parameter:
904           make-parallel-jobs: '{make-parallel-jobs}'
905       - os-parameter:
906           os: '{os}'
907       - project-parameter:
908           project: '{project}'
909       - repo-name-parameter:
910           repo-name: '{repo-stream-part}.ubuntu.bionic.main'
911       - stream-parameter:
912           stream: '{stream}'
913
914     scm:
915       - gerrit-trigger-scm:
916           credentials-id: 'jenkins-gerrit-credentials'
917           refspec: '$GERRIT_REFSPEC'
918           choosing-strategy: 'gerrit'
919
920     wrappers:
921       - fdio-infra-wrappers:
922           build-timeout: '90'
923
924     triggers:
925       - 'gerrit-trigger-vpp-csit-devicetest-full':
926           name: '{project}'
927           branch: '{branch}'
928           skip-vote: '{skip-vote}'
929
930     builders:
931       - shell:
932           !include-raw-escape:
933           - ../scripts/setup_executor_env.sh
934       - shell:
935           !include-raw-escape:
936           - ../scripts/setup_vpp_ubuntu_docker_test.sh
937       - shell:
938           !include-raw-escape:
939           - ../scripts/setup_vpp_dpdk_dev_env.sh
940       - shell:
941           !include-raw-escape:
942           - ../scripts/vpp/csit-device.sh
943
944     publishers:
945       - robot-report:
946           output-path: 'archives'
947
948       - fdio-infra-publish
949 # [end] VPP-CSIT-VERIFY-DEVICE-PERPATCH JOB TEMPLATE
950
951 # VPP-CSIT-VERIFY-PERF JOB TEMPLATE
952 - job-template:
953     name: 'vpp-csit-verify-perf-{stream}-{os}-{executor-arch}-{testbed-arch}'
954     description: |
955       <ul>
956           <li>executor
957               <ul>
958                   <li>builder-{os}-prod-{executor-arch}
959               </ul>
960           <li>testbed architecture
961               <ul>
962                   <li>{testbed-arch}
963               </ul>
964           <li>Objective
965           Contrary to csit-vpp job, this also measures the parent performance,
966           and fails if performance regression is detected.
967           See https://github.com/FDio/csit/blob/master/docs/cpta/methodology/perpatch_performance_tests.rst
968       </ul>
969
970     project-type: freestyle
971     node: 'builder-{os}-prod-{executor-arch}'
972     concurrent: true
973     archive-artifacts: >
974       **/csit_current/**/*.*
975       **/csit_parent/**/*.*
976     latest-only: false
977
978     build-discarder:
979       daysToKeep: '{build-days-to-keep}'
980       numToKeep: 100
981       artifactDaysToKeep: '{build-artifact-days-to-keep}'
982       artifactNumToKeep: '{build-artifact-num-to-keep}'
983
984     # Please keep parameters in alphabetical order
985     parameters:
986       - archive-artifacts-parameter:
987           artifacts: '{archive-artifacts}'
988       - csit-perf-trial-duration-parameter:
989           csit-perf-trial-duration: "10.0"
990       - csit-perf-trial-multiplicity-parameter:
991           csit-perf-trial-multiplicity: "5"
992       - gerrit-csit-refspec-parameter
993       - gerrit-event-comment-text-parameter
994       - gerrit-event-type-parameter
995       - gerrit-refspec-parameter:
996           refspec: '{branch-refspec}'
997       - gerrit-parameter:
998           branch: '{branch}'
999       - make-parallel-jobs-parameter:
1000           make-parallel-jobs: '{make-parallel-jobs}'
1001       - os-parameter:
1002           os: '{os}'
1003       - project-parameter:
1004           project: '{project}'
1005       - repo-name-parameter:
1006           repo-name: '{repo-stream-part}.ubuntu.bionic.main'
1007       - stream-parameter:
1008           stream: '{stream}'
1009
1010     scm:
1011       - gerrit-trigger-scm:
1012           credentials-id: 'jenkins-gerrit-credentials'
1013           refspec: '$GERRIT_REFSPEC'
1014           choosing-strategy: 'gerrit'
1015
1016     wrappers:
1017       - fdio-infra-wrappers-non-activity-timeout:
1018           build-timeout: 300
1019
1020     triggers:
1021       - gerrit-trigger-csit-perftest:
1022           project: '{project}'
1023           branch: '{branch}'
1024           trigger-word: 'perftest-{testbed-arch}'
1025           skip-vote: true
1026
1027     builders:
1028       - shell:
1029           !include-raw-escape:
1030           - ../scripts/setup_executor_env.sh
1031       - shell:
1032           !include-raw-escape:
1033           - ../scripts/setup_vpp_ubuntu_docker_test.sh
1034       - shell:
1035           !include-raw-escape:
1036           - ../scripts/setup_vpp_dpdk_dev_env.sh
1037       - shell:
1038           !include-raw-escape:
1039           - ../scripts/vpp/csit-perf.sh
1040
1041     publishers:
1042       - robot-report:
1043           output-path: 'csit_current/0/'
1044
1045       - fdio-infra-publish
1046 # [end] VPP-CSIT-VERIFY-PERF JOB TEMPLATE
1047
1048 # VPP-CSIT-VERIFY-API-CRC JOB TEMPLATE
1049 - job-template:
1050     name: 'vpp-csit-verify-api-crc-{stream}-{os}-{executor-arch}'
1051
1052     project-type: freestyle
1053     node: 'builder-{os}-prod-{executor-arch}'
1054     concurrent: true
1055     latest-only: false
1056
1057     build-discarder:
1058       daysToKeep: '{build-days-to-keep}'
1059       numToKeep: 100
1060       artifactDaysToKeep: '{build-artifact-days-to-keep}'
1061       artifactNumToKeep: '{build-artifact-num-to-keep}'
1062
1063     # Please keep parameters in alphabetical order
1064     parameters:
1065       - archive-artifacts-parameter:
1066           artifacts: '{archive-artifacts}'
1067       # Not sure whether not failing has any useful usage,
1068       # but it does not hurt to have some flexibility for future.
1069       - csit-fail-on-crc-mismatch-parameter:
1070           fail-on-crc-mismatch: 'True'
1071       - gerrit-csit-refspec-parameter
1072       - gerrit-parameter:
1073           branch: '{branch}'
1074       - gerrit-refspec-parameter:
1075           refspec: '{branch-refspec}'
1076       - project-parameter:
1077           project: '{project}'
1078       - stream-parameter:
1079           stream: '{stream}'
1080
1081     scm:
1082       - gerrit-trigger-scm:
1083           credentials-id: 'jenkins-gerrit-credentials'
1084           refspec: '$GERRIT_REFSPEC'
1085           choosing-strategy: 'gerrit'
1086
1087     wrappers:
1088       - fdio-infra-wrappers-non-activity-timeout:
1089           build-timeout: 300
1090
1091     triggers:
1092       - gerrit-trigger-checkstyle:
1093           name: '{project}'
1094           branch: '{branch}'
1095
1096     builders:
1097       - shell:
1098           !include-raw-escape:
1099           - ../scripts/setup_executor_env.sh
1100       - shell:
1101           !include-raw-escape:
1102           - ../scripts/setup_vpp_ubuntu_docker_test.sh
1103       - shell:
1104           !include-raw-escape:
1105           - ../scripts/vpp/check_crc.sh
1106       # TODO: Add sending e-mail notifications to vpp-api-dev@lists.fd.io
1107
1108     publishers:
1109       - fdio-infra-publish
1110 # [end] VPP-CSIT-VERIFY-API-CRC JOB TEMPLATE
1111 # [end] JOB TEMPLATE DEFINITIONS