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