CSIT: Reduce daily jobs cadence for 2406 report data collection
[ci-management.git] / jjb / hicn / hicn.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:
16     name: hicn-x86_64
17     jobs:
18       - "hicn-verify-build-{stream}-{os}-{executor-arch}"
19       - "hicn-verify-functest-{stream}-{os}-{executor-arch}"
20       - "hicn-merge-{stream}-{os}-{executor-arch}"
21     project: "hicn"
22     os: ubuntu2004
23     executor-arch: "x86_64"
24     stream:
25       - "master":
26           branch: "master"
27           repo: "hicn"
28       - "2210":
29           branch: "stable/2210"
30           repo: "2210"
31
32 - project:
33     name: hicn-aarch64
34     jobs:
35       - "hicn-verify-build-{stream}-{os}-{executor-arch}"
36       - "hicn-merge-{stream}-{os}-{executor-arch}"
37     project: "hicn"
38     os: ubuntu2004
39     executor-arch: "aarch64"
40     stream:
41       - "master":
42           branch: "master"
43           repo: "hicn"
44       - "2210":
45           branch: "stable/2210"
46           repo: "2210"
47
48 - project:
49     name: hicn-misc
50     jobs:
51       - "hicn-checkstyle-verify-{stream}-{os}-{executor-arch}"
52     project: "hicn"
53     stream:
54       - "master":
55           branch: "master"
56           repo: "hicn"
57       - "2210":
58           branch: "stable/2210"
59           repo: "2210"
60     os: ubuntu2004
61     executor-arch: "x86_64"
62
63 - project:
64     name: hicn-extras-x86_64
65     jobs:
66       - "hicn-extras-verify-{stream}-{os}-{executor-arch}"
67       - "hicn-extras-build-{stream}-{os}-{executor-arch}"
68     project: "hicn"
69     os: ubuntu2004
70     executor-arch: "x86_64"
71     stream:
72       - "master":
73           branch: "master"
74           repo: "hicn"
75       - "2210":
76           branch: "stable/2210"
77           repo: "2210"
78
79 - project:
80     name: hicn-extras-aarch64
81     jobs:
82       - "hicn-extras-verify-{stream}-{os}-{executor-arch}"
83       - "hicn-extras-build-{stream}-{os}-{executor-arch}"
84     project: "hicn"
85     os: ubuntu2004
86     executor-arch: "aarch64"
87     stream:
88       - "master":
89           branch: "master"
90           repo: "hicn"
91       - "2210":
92           branch: "stable/2210"
93           repo: "2210"
94
95 - project:
96     name: hicn-vpp-latest-x86_64
97     jobs:
98       - "hicn-vpp-latest-verify-{stream}-{os}-{executor-arch}"
99     project: "hicn"
100     os: ubuntu2004
101     executor-arch: "x86_64"
102     stream:
103       - "master":
104           branch: "master"
105           repo: "hicn"
106
107 - project:
108     name: hicn-vpp-latest-aarch64
109     jobs:
110       - "hicn-vpp-latest-verify-{stream}-{os}-{executor-arch}"
111     project: "hicn"
112     os: ubuntu2004
113     executor-arch: "aarch64"
114     stream:
115       - "master":
116           branch: "master"
117           repo: "hicn"
118
119 - project:
120     name: hicn-view
121     views:
122       - project-view
123     project-name: hicn
124
125 - project:
126     name: hicn-sonar
127     jobs:
128       - "hicn-sonar-scanner-{stream}"
129     project: hicn
130     sonarcloud: true
131     sonarcloud-project-organization: "{sonarcloud_project_organization}"
132     sonarcloud-api-token: "{sonarcloud_api_token}"
133     sonarcloud-project-key: "{sonarcloud_project_organization}-{project}"
134     stream:
135       - "master":
136           branch: "master"
137           repo: "hicn"
138       - "2210":
139           branch: "stable/2210"
140           repo: "2210"
141
142 - job-template:
143     name: "hicn-sonar-scanner-{stream}"
144
145     project-type: freestyle
146     node: centos7-docker-4c-4g
147     concurrent: true
148
149     parameters:
150       - project-parameter:
151           project: "{project}"
152       - gerrit-parameter:
153           branch: "{branch}"
154       - stream-parameter:
155           stream: "{repo}"
156
157     scm:
158       - gerrit-trigger-scm:
159           credentials-id: "jenkins-gerrit-credentials"
160           refspec: ""
161           choosing-strategy: "default"
162
163     wrappers:
164       - fdio-infra-wrappers:
165           build-timeout: "{build-timeout}"
166
167     triggers:
168       - gerrit-trigger-patch-merged:
169           name: "{project}"
170           branch: "{branch}"
171
172     builders:
173       - inject:
174           properties-content: |
175             SONAR_HOST_URL=https://sonarcloud.io
176             PROJECT_KEY={sonarcloud-project-key}
177             PROJECT_ORGANIZATION={sonarcloud-project-organization}
178             API_TOKEN={sonarcloud-api-token}
179       - shell: !include-raw-escape:
180           - ../scripts/hicn/sonar.sh
181
182 - job-template:
183     name: "hicn-checkstyle-verify-{stream}-{os}-{executor-arch}"
184
185     project-type: freestyle
186     node: "builder-{os}-prod-{executor-arch}"
187     concurrent: true
188
189     properties:
190       - lf-infra-properties:
191           build-days-to-keep: "{build-days-to-keep}"
192
193     parameters:
194       - project-parameter:
195           project: "{project}"
196       - gerrit-parameter:
197           branch: "{branch}"
198       - os-parameter:
199           os: "{os}"
200
201     scm:
202       - gerrit-trigger-scm:
203           credentials-id: "jenkins-gerrit-credentials"
204           refspec: "$GERRIT_REFSPEC"
205           choosing-strategy: "gerrit"
206
207     wrappers:
208       - fdio-infra-wrappers:
209           build-timeout: "{build-timeout}"
210
211     triggers:
212       - gerrit:
213           server-name: "Primary"
214           trigger-on:
215             - patchset-created-event:
216                 exclude-drafts: "true"
217                 exclude-trivial-rebase: "false"
218                 exclude-no-code-change: "true"
219             - draft-published-event
220             - comment-added-contains-event:
221                 comment-contains-value: "checkstylecheck"
222             - comment-added-contains-event:
223                 comment-contains-value: "docsonly"
224             - comment-added-contains-event:
225                 comment-contains-value: "recheck"
226             - comment-added-contains-event:
227                 comment-contains-value: "reverify"
228           projects:
229             - project-compare-type: "ANT"
230               project-pattern: "{project}"
231               branches:
232                 - branch-compare-type: "ANT"
233                   branch-pattern: "**/{branch}"
234               file-paths:
235                 - compare-type: REG_EXP
236                   pattern: ^((?!\/COMMIT_MSG|docs|_abc|_def[\/\.]).)*$
237               disable-strict-forbidden-file-verification: "true"
238           override-votes: true
239           gerrit-build-notbuilt-verified-value: 0
240           gerrit-build-successful-verified-value: 1
241           # yamllint disable-line rule:line-length
242           notbuilt-message: "Automatic retry of failed jobs may be in process. A proper vote should be set when retry completes."
243           # yamllint disable-line rule:line-length
244           failed-message: "Checkstyle failed. No further verify jobs will be started."
245           successful-message: "checkstyle_success"
246           skip-vote:
247             successful: true
248             failed: false
249             unstable: false
250             notbuilt: false
251
252     builders:
253       - shell: !include-raw-escape:
254           - ../scripts/setup_executor_env.sh
255       - shell: !include-raw-escape:
256           - ../scripts/hicn/checkstyle.sh
257
258     publishers:
259       - fdio-infra-publish
260       - naginator:
261           rerun-unstable-builds: true
262           max-failed-builds: 1
263           fixed-delay: 90
264
265 - job-template:
266     name: "hicn-verify-build-{stream}-{os}-{executor-arch}"
267
268     project-type: freestyle
269     node: "builder-{os}-prod-{executor-arch}"
270     concurrent: true
271
272     properties:
273       - lf-infra-properties:
274           build-days-to-keep: "{build-days-to-keep}"
275
276     parameters:
277       - project-parameter:
278           project: "{project}"
279       - gerrit-parameter:
280           branch: "{branch}"
281       - os-parameter:
282           os: "{os}"
283       - stream-parameter:
284           stream: "{repo}"
285
286     scm:
287       - gerrit-trigger-scm:
288           credentials-id: "jenkins-gerrit-credentials"
289           refspec: "$GERRIT_REFSPEC"
290           choosing-strategy: "gerrit"
291
292     wrappers:
293       - fdio-infra-wrappers:
294           build-timeout: 120
295
296     triggers:
297       - gerrit:
298           server-name: "Primary"
299           trigger-on:
300             - comment-added-contains-event:
301                 comment-contains-value: "checkstyle_success"
302           projects:
303             - project-compare-type: "ANT"
304               project-pattern: "{project}"
305               branches:
306                 - branch-compare-type: "ANT"
307                   branch-pattern: "**/{branch}"
308           # yamllint disable-line rule:line-length
309           notbuilt-message: "Automatic retry of failed jobs may be in process. A proper vote should be set when retry completes."
310           # yamllint disable-line rule:line-length
311           failed-message: "Build failed. No further verify jobs will be started."
312           successful-message: "build_success-{stream}-{os}-{executor-arch}"
313           skip-vote:
314             successful: true
315             failed: true
316             unstable: true
317             notbuilt: true
318           override-votes: true
319           gerrit-build-successful-verified-value: 1
320           gerrit-build-failed-verified-value: 1
321           gerrit-build-unstable-verified-value: 1
322           gerrit-build-notbuilt-verified-value: 1
323
324     builders:
325       - shell: !include-raw-escape:
326           - ../scripts/setup_executor_env.sh
327       - shell: !include-raw-escape:
328           - ../scripts/hicn/build.sh
329
330     publishers:
331       - fdio-infra-publish
332       - archive-artifacts:
333           artifacts: "packages/*.deb, packages/*.rpm"
334       - xunit:
335           thresholdmode: "percent"
336           thresholds:
337             - failed:
338                 failure: 0
339           types:
340             - gtest:
341                 pattern: "**/reports/*report.xml"
342
343 - job-template:
344     name: "hicn-verify-functest-{stream}-{os}-{executor-arch}"
345
346     project-type: freestyle
347     node: "ubuntu2004-docker-4c-4g"
348     concurrent: true
349
350     properties:
351       - lf-infra-properties:
352           build-days-to-keep: "{build-days-to-keep}"
353
354     parameters:
355       - project-parameter:
356           project: "{project}"
357       - gerrit-parameter:
358           branch: "{branch}"
359       - os-parameter:
360           os: "{os}"
361       - stream-parameter:
362           stream: "{repo}"
363
364     scm:
365       - gerrit-trigger-scm:
366           credentials-id: "jenkins-gerrit-credentials"
367           refspec: "$GERRIT_REFSPEC"
368           choosing-strategy: "gerrit"
369
370     wrappers:
371       - fdio-infra-wrappers:
372           build-timeout: 120
373
374     triggers:
375       - gerrit-trigger-build:
376           name: "{project}"
377           branch: "{branch}"
378           stream: "{stream}"
379           os: "{os}"
380           executor-arch: "{executor-arch}"
381
382     builders:
383       - shell: !include-raw-escape:
384           - ../scripts/hicn/functest.sh
385
386     publishers:
387       - robot:
388           output-path: "tests"
389           pass-threshold: 75.0
390           only-critical: false
391       - fdio-infra-publish
392
393 - job-template:
394     name: "hicn-merge-{stream}-{os}-{executor-arch}"
395
396     project-type: freestyle
397     node: "builder-{os}-prod-{executor-arch}"
398
399     properties:
400       - lf-infra-properties:
401           build-days-to-keep: "{build-days-to-keep}"
402
403     parameters:
404       - project-parameter:
405           project: "{project}"
406       - gerrit-parameter:
407           branch: "{branch}"
408       - os-parameter:
409           os: "{os}"
410       - stream-parameter:
411           stream: "{stream}"
412
413     scm:
414       - gerrit-trigger-scm:
415           credentials-id: "jenkins-gerrit-credentials"
416           refspec: ""
417           choosing-strategy: "default"
418
419     wrappers:
420       - fdio-infra-wrappers:
421           build-timeout: "{build-timeout}"
422
423     triggers:
424       - gerrit-trigger-patch-merged:
425           name: "{project}"
426           branch: "{branch}"
427
428     builders:
429       - config-file-provider:
430           files:
431             - file-id: ".packagecloud"
432               target: "/root/.packagecloud"
433       - config-file-provider:
434           files:
435             - file-id: "packagecloud_api"
436               target: "/root/packagecloud_api"
437       - shell: !include-raw-escape:
438           - ../scripts/setup_executor_env.sh
439       - shell: !include-raw-escape:
440           - ../scripts/hicn/checkstyle.sh
441       - shell: !include-raw-escape:
442           - ../scripts/hicn/build.sh
443       - shell: !include-raw-escape:
444           - ../scripts/packagecloud_push.sh
445
446     publishers:
447       - fdio-infra-publish
448       - xunit:
449           thresholdmode: "percent"
450           thresholds:
451             - failed:
452                 failure: 0
453           types:
454             - gtest:
455                 pattern: "**/reports/*report.xml"
456
457 - job-template:
458     name: "hicn-extras-verify-{stream}-{os}-{executor-arch}"
459
460     project-type: freestyle
461     node: "builder-{os}-prod-{executor-arch}"
462     concurrent: true
463
464     properties:
465       - lf-infra-properties:
466           build-days-to-keep: "{build-days-to-keep}"
467
468     parameters:
469       - project-parameter:
470           project: "{project}"
471       - gerrit-parameter:
472           branch: "{branch}"
473       - os-parameter:
474           os: "{os}"
475       - stream-parameter:
476           stream: "{repo}"
477
478     scm:
479       - gerrit-trigger-scm:
480           credentials-id: "jenkins-gerrit-credentials"
481           refspec: "$GERRIT_REFSPEC"
482           choosing-strategy: "gerrit"
483
484     wrappers:
485       - fdio-infra-wrappers:
486           build-timeout: 120
487
488     triggers:
489       - gerrit:
490           server-name: "Primary"
491           trigger-on:
492             - comment-added-contains-event:
493                 comment-contains-value: "verify-extras"
494           projects:
495             - project-compare-type: "ANT"
496               project-pattern: "{project}"
497               branches:
498                 - branch-compare-type: "ANT"
499                   branch-pattern: "**/{branch}"
500
501     builders:
502       - shell: !include-raw-escape:
503           - ../scripts/setup_executor_env.sh
504       - shell: !include-raw-escape:
505           - ../scripts/hicn/build-extras.sh
506
507     publishers:
508       - fdio-infra-publish
509
510 - job-template:
511     name: "hicn-extras-build-{stream}-{os}-{executor-arch}"
512
513     project-type: freestyle
514     node: "builder-{os}-prod-{executor-arch}"
515
516     properties:
517       - lf-infra-properties:
518           build-days-to-keep: "{build-days-to-keep}"
519
520     parameters:
521       - project-parameter:
522           project: "{project}"
523       - gerrit-parameter:
524           branch: "{branch}"
525       - os-parameter:
526           os: "{os}"
527       - stream-parameter:
528           stream: "{repo}"
529
530     scm:
531       - gerrit-trigger-scm:
532           credentials-id: "jenkins-gerrit-credentials"
533           refspec: ""
534           choosing-strategy: "default"
535
536     wrappers:
537       - fdio-infra-wrappers:
538           build-timeout: "{build-timeout}"
539
540     triggers:
541       - gerrit:
542           server-name: "Primary"
543           trigger-on:
544             - comment-added-contains-event:
545                 comment-contains-value: "build-extras"
546           projects:
547             - project-compare-type: "ANT"
548               project-pattern: "{project}"
549               branches:
550                 - branch-compare-type: "ANT"
551                   branch-pattern: "**/{branch}"
552
553     builders:
554       - config-file-provider:
555           files:
556             - file-id: ".packagecloud"
557               target: "/root/.packagecloud"
558       - config-file-provider:
559           files:
560             - file-id: "packagecloud_api"
561               target: "/root/packagecloud_api"
562       - shell: !include-raw-escape:
563           - ../scripts/setup_executor_env.sh
564       - shell: !include-raw-escape:
565           - ../scripts/hicn/build-extras.sh
566       - shell: !include-raw-escape:
567           - ../scripts/packagecloud_push.sh
568
569     publishers:
570       - fdio-infra-publish
571
572 - job-template:
573     name: "hicn-vpp-latest-verify-{stream}-{os}-{executor-arch}"
574
575     project-type: freestyle
576     node: "builder-{os}-prod-{executor-arch}"
577     concurrent: true
578
579     properties:
580       - lf-infra-properties:
581           build-days-to-keep: "{build-days-to-keep}"
582
583     parameters:
584       - project-parameter:
585           project: "{project}"
586       - gerrit-parameter:
587           branch: "{branch}"
588       - os-parameter:
589           os: "{os}"
590       - stream-parameter:
591           stream: "{repo}"
592
593     scm:
594       - gerrit-trigger-scm:
595           credentials-id: "jenkins-gerrit-credentials"
596           refspec: "$GERRIT_REFSPEC"
597           choosing-strategy: "gerrit"
598
599     wrappers:
600       - fdio-infra-wrappers:
601           build-timeout: 120
602
603     triggers:
604       - timed: "H H * * *"
605       - gerrit-trigger-manually-triggered:
606           comment-trigger-value: "verify-vpp-latest"
607           name: "{project}"
608           branch: "{branch}"
609
610     builders:
611       - shell: !include-raw-escape:
612           - ../scripts/setup_executor_env.sh
613       - shell: !include-raw-escape:
614           - ../scripts/hicn/build-vpp-latest.sh
615
616     publishers:
617       - fdio-infra-publish
618
619 - project:
620     name: hicn-info
621     project-name: hicn
622     jobs:
623       - gerrit-info-yaml-verify
624     build-node: centos7-builder-2c-2g
625     project: hicn
626     branch: master