Merge "Add hicn job to build against vpp latest."
[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
307 - job-template:
308     name: "hicn-verify-functest-{stream}-{os}-{executor-arch}"
309
310     project-type: freestyle
311     node: "centos7-docker-4c-4g"
312     concurrent: true
313
314     properties:
315       - lf-infra-properties:
316           build-days-to-keep: "{build-days-to-keep}"
317
318     parameters:
319       - project-parameter:
320           project: "{project}"
321       - gerrit-parameter:
322           branch: "{branch}"
323       - os-parameter:
324           os: "{os}"
325       - stream-parameter:
326           stream: "{stream}"
327
328     scm:
329       - gerrit-trigger-scm:
330           credentials-id: "jenkins-gerrit-credentials"
331           refspec: "$GERRIT_REFSPEC"
332           choosing-strategy: "gerrit"
333
334     wrappers:
335       - fdio-infra-wrappers:
336           build-timeout: 120
337
338     triggers:
339       - gerrit-trigger-build:
340           name: "{project}"
341           branch: "{branch}"
342           stream: "{stream}"
343           os: "{os}"
344           executor-arch: "{executor-arch}"
345
346     builders:
347       - shell: !include-raw-escape:
348           - ../scripts/hicn/functest.sh
349
350     publishers:
351       - robot-report:
352           output-path: "tests"
353
354 - job-template:
355     name: "hicn-merge-{stream}-{os}-{executor-arch}"
356
357     project-type: freestyle
358     node: "builder-{os}-prod-{executor-arch}"
359
360     properties:
361       - lf-infra-properties:
362           build-days-to-keep: "{build-days-to-keep}"
363
364     parameters:
365       - project-parameter:
366           project: "{project}"
367       - gerrit-parameter:
368           branch: "{branch}"
369       - os-parameter:
370           os: "{os}"
371       - stream-parameter:
372           stream: "{stream}"
373
374     scm:
375       - gerrit-trigger-scm:
376           credentials-id: "jenkins-gerrit-credentials"
377           refspec: ""
378           choosing-strategy: "default"
379
380     wrappers:
381       - fdio-infra-wrappers:
382           build-timeout: "{build-timeout}"
383
384     triggers:
385       - gerrit-trigger-patch-merged:
386           name: "{project}"
387           branch: "{branch}"
388
389     builders:
390       - config-file-provider:
391           files:
392             - file-id: ".packagecloud"
393               target: "/root/.packagecloud"
394       - config-file-provider:
395           files:
396             - file-id: "packagecloud_api"
397               target: "/root/packagecloud_api"
398       - shell: !include-raw-escape:
399           - ../scripts/setup_executor_env.sh
400       - shell: !include-raw-escape:
401           - ../scripts/hicn/checkstyle.sh
402       - shell: !include-raw-escape:
403           - ../scripts/hicn/build.sh
404       - shell: !include-raw-escape:
405           - ../scripts/packagecloud_push.sh
406
407     publishers:
408       - fdio-infra-publish
409
410 - job-template:
411     name: "hicn-extras-verify-{stream}-{os}-{executor-arch}"
412
413     project-type: freestyle
414     node: "builder-{os}-prod-{executor-arch}"
415     concurrent: true
416
417     properties:
418       - lf-infra-properties:
419           build-days-to-keep: "{build-days-to-keep}"
420
421     parameters:
422       - project-parameter:
423           project: "{project}"
424       - gerrit-parameter:
425           branch: "{branch}"
426       - os-parameter:
427           os: "{os}"
428       - stream-parameter:
429           stream: "{stream}"
430
431     scm:
432       - gerrit-trigger-scm:
433           credentials-id: "jenkins-gerrit-credentials"
434           refspec: "$GERRIT_REFSPEC"
435           choosing-strategy: "gerrit"
436
437     wrappers:
438       - fdio-infra-wrappers:
439           build-timeout: 120
440
441     triggers:
442       - gerrit:
443           server-name: "Primary"
444           trigger-on:
445             - comment-added-contains-event:
446                 comment-contains-value: "verify-extras"
447           projects:
448             - project-compare-type: "ANT"
449               project-pattern: "{project}"
450               branches:
451                 - branch-compare-type: "ANT"
452                   branch-pattern: "**/{branch}"
453
454     builders:
455       - shell: !include-raw-escape:
456           - ../scripts/setup_executor_env.sh
457       - shell: !include-raw-escape:
458           - ../scripts/hicn/build-extras.sh
459
460     publishers:
461       - fdio-infra-publish
462
463 - job-template:
464     name: "hicn-extras-build-{stream}-{os}-{executor-arch}"
465
466     project-type: freestyle
467     node: "builder-{os}-prod-{executor-arch}"
468
469     properties:
470       - lf-infra-properties:
471           build-days-to-keep: "{build-days-to-keep}"
472
473     parameters:
474       - project-parameter:
475           project: "{project}"
476       - gerrit-parameter:
477           branch: "{branch}"
478       - os-parameter:
479           os: "{os}"
480       - stream-parameter:
481           stream: "hicn"
482
483     scm:
484       - gerrit-trigger-scm:
485           credentials-id: "jenkins-gerrit-credentials"
486           refspec: ""
487           choosing-strategy: "default"
488
489     wrappers:
490       - fdio-infra-wrappers:
491           build-timeout: "{build-timeout}"
492
493     triggers:
494       - gerrit:
495           server-name: "Primary"
496           trigger-on:
497             - comment-added-contains-event:
498                 comment-contains-value: "build-extras"
499           projects:
500             - project-compare-type: "ANT"
501               project-pattern: "{project}"
502               branches:
503                 - branch-compare-type: "ANT"
504                   branch-pattern: "**/{branch}"
505
506     builders:
507       - config-file-provider:
508           files:
509             - file-id: ".packagecloud"
510               target: "/root/.packagecloud"
511       - config-file-provider:
512           files:
513             - file-id: "packagecloud_api"
514               target: "/root/packagecloud_api"
515       - shell: !include-raw-escape:
516           - ../scripts/setup_executor_env.sh
517       - shell: !include-raw-escape:
518           - ../scripts/hicn/build-extras.sh
519       - shell: !include-raw-escape:
520           - ../scripts/packagecloud_push.sh
521
522     publishers:
523       - fdio-infra-publish
524
525 - job-template:
526     name: "hicn-vpp-latest-verify-{stream}-{os}-{executor-arch}"
527
528     project-type: freestyle
529     node: "builder-{os}-prod-{executor-arch}"
530     concurrent: true
531
532     properties:
533       - lf-infra-properties:
534           build-days-to-keep: "{build-days-to-keep}"
535
536     parameters:
537       - project-parameter:
538           project: "{project}"
539       - gerrit-parameter:
540           branch: "{branch}"
541       - os-parameter:
542           os: "{os}"
543       - stream-parameter:
544           stream: "{stream}"
545
546     scm:
547       - gerrit-trigger-scm:
548           credentials-id: "jenkins-gerrit-credentials"
549           refspec: "$GERRIT_REFSPEC"
550           choosing-strategy: "gerrit"
551
552     wrappers:
553       - fdio-infra-wrappers:
554           build-timeout: 120
555
556     triggers:
557
558       - timed: 'H H * * *'
559       - gerrit-trigger-manually-triggered:
560           comment-trigger-value: 'verify-vpp-latest'
561           name: '{project}'
562           branch: '{branch}'
563
564     builders:
565       - shell: !include-raw-escape:
566           - ../scripts/setup_executor_env.sh
567       - shell: !include-raw-escape:
568           - ../scripts/hicn/build-vpp-latest.sh
569
570     publishers:
571       - fdio-infra-publish
572
573 - project:
574     name: hicn-info
575     project-name: hicn
576     jobs:
577       - gerrit-info-yaml-verify
578     build-node: centos7-builder-2c-2g
579     project: hicn
580     branch: master