41b7620c1ebac12043960d6adfdf43678818bad1
[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-view
77     views:
78       - project-view
79     project-name: hicn
80
81 - project:
82     name: hicn-sonar
83     jobs:
84       - hicn-sonar-scanner
85     project: hicn
86     sonarcloud: true
87     sonarcloud-project-organization: "{sonarcloud_project_organization}"
88     sonarcloud-api-token: "{sonarcloud_api_token}"
89     sonarcloud-project-key: "{sonarcloud_project_organization}-{project}"
90     stream:
91       - hicn:
92           branch: "master"
93
94 - job-template:
95     name: hicn-sonar-scanner
96
97     project-type: freestyle
98     node: centos7-docker-4c-4g
99     concurrent: true
100
101     parameters:
102       - project-parameter:
103           project: "{project}"
104       - gerrit-parameter:
105           branch: "{branch}"
106       - stream-parameter:
107           stream: "{stream}"
108
109     scm:
110       - gerrit-trigger-scm:
111           credentials-id: "jenkins-gerrit-credentials"
112           refspec: ""
113           choosing-strategy: "default"
114
115     wrappers:
116       - fdio-infra-wrappers:
117           build-timeout: "{build-timeout}"
118
119     triggers:
120       - gerrit-trigger-patch-merged:
121           name: "{project}"
122           branch: "{branch}"
123
124     builders:
125       - inject:
126           properties-content: |
127             SONAR_HOST_URL=https://sonarcloud.io
128             PROJECT_KEY={sonarcloud-project-key}
129             PROJECT_ORGANIZATION={sonarcloud-project-organization}
130             API_TOKEN={sonarcloud-api-token}
131       - shell: !include-raw-escape:
132           - ../scripts/hicn/sonar.sh
133
134 - job-template:
135     name: "hicn-checkstyle-verify-{stream}-{os}-{executor-arch}"
136
137     project-type: freestyle
138     node: "builder-{os}-prod-{executor-arch}"
139     concurrent: true
140
141     properties:
142       - lf-infra-properties:
143           build-days-to-keep: "{build-days-to-keep}"
144
145     parameters:
146       - project-parameter:
147           project: "{project}"
148       - gerrit-parameter:
149           branch: "{branch}"
150       - os-parameter:
151           os: "{os}"
152
153     scm:
154       - gerrit-trigger-scm:
155           credentials-id: "jenkins-gerrit-credentials"
156           refspec: "$GERRIT_REFSPEC"
157           choosing-strategy: "gerrit"
158
159     wrappers:
160       - fdio-infra-wrappers:
161           build-timeout: "{build-timeout}"
162
163     triggers:
164       - gerrit:
165           server-name: "Primary"
166           trigger-on:
167             - patchset-created-event:
168                 exclude-drafts: "true"
169                 exclude-trivial-rebase: "false"
170                 exclude-no-code-change: "true"
171             - draft-published-event
172             - comment-added-contains-event:
173                 comment-contains-value: "checkstylecheck"
174             - comment-added-contains-event:
175                 comment-contains-value: "docsonly"
176             - comment-added-contains-event:
177                 comment-contains-value: "recheck"
178             - comment-added-contains-event:
179                 comment-contains-value: "reverify"
180           projects:
181             - project-compare-type: "ANT"
182               project-pattern: "{project}"
183               branches:
184                 - branch-compare-type: "ANT"
185                   branch-pattern: "**/{branch}"
186               file-paths:
187                 - compare-type: REG_EXP
188                   pattern: ^((?!\/COMMIT_MSG|docs|_abc|_def[\/\.]).)*$
189               disable-strict-forbidden-file-verification: "true"
190           override-votes: true
191           gerrit-build-notbuilt-verified-value: 0
192           gerrit-build-successful-verified-value: 1
193           # yamllint disable-line rule:line-length
194           notbuilt-message: "Automatic retry of failed jobs may be in process. A proper vote should be set when retry completes."
195           # yamllint disable-line rule:line-length
196           failed-message: "Checkstyle failed. No further verify jobs will be started."
197           successful-message: "checkstyle_success"
198           skip-vote:
199             successful: true
200             failed: false
201             unstable: false
202             notbuilt: false
203
204     builders:
205       - shell: !include-raw-escape:
206           - ../scripts/setup_executor_env.sh
207       - shell: !include-raw-escape:
208           - ../scripts/hicn/checkstyle.sh
209
210     publishers:
211       - fdio-infra-publish
212       - naginator:
213           rerun-unstable-builds: true
214           max-failed-builds: 1
215           fixed-delay: 90
216
217 - job-template:
218     name: "hicn-verify-build-{stream}-{os}-{executor-arch}"
219
220     project-type: freestyle
221     node: "builder-{os}-prod-{executor-arch}"
222     concurrent: true
223
224     properties:
225       - lf-infra-properties:
226           build-days-to-keep: "{build-days-to-keep}"
227
228     parameters:
229       - project-parameter:
230           project: "{project}"
231       - gerrit-parameter:
232           branch: "{branch}"
233       - os-parameter:
234           os: "{os}"
235       - stream-parameter:
236           stream: "{stream}"
237
238     scm:
239       - gerrit-trigger-scm:
240           credentials-id: "jenkins-gerrit-credentials"
241           refspec: "$GERRIT_REFSPEC"
242           choosing-strategy: "gerrit"
243
244     wrappers:
245       - fdio-infra-wrappers:
246           build-timeout: 120
247
248     triggers:
249       - gerrit-trigger-checkstyle:
250           name: "{project}"
251           branch: "{branch}"
252       - gerrit:
253           override-votes: true
254           gerrit-build-notbuilt-verified-value: 0
255           gerrit-build-successful-verified-value: 1
256           # yamllint disable-line rule:line-length
257           notbuilt-message: "Automatic retry of failed jobs may be in process. A proper vote should be set when retry completes."
258           # yamllint disable-line rule:line-length
259           failed-message: "Build failed. No further verify jobs will be started."
260           successful-message: "build_success"
261           skip-vote:
262             successful: true
263             failed: false
264             unstable: false
265             notbuilt: false
266
267
268     builders:
269       - shell: !include-raw-escape:
270           - ../scripts/setup_executor_env.sh
271       - shell: !include-raw-escape:
272           - ../scripts/hicn/build.sh
273
274     publishers:
275       - fdio-infra-publish
276
277 - job-template:
278     name: "hicn-verify-functest-{stream}-{os}-{executor-arch}"
279
280     project-type: freestyle
281     node: "{os}-builder-4c-4g"
282     concurrent: true
283
284     properties:
285       - lf-infra-properties:
286           build-days-to-keep: "{build-days-to-keep}"
287
288     parameters:
289       - project-parameter:
290           project: "{project}"
291       - gerrit-parameter:
292           branch: "{branch}"
293       - os-parameter:
294           os: "{os}"
295       - stream-parameter:
296           stream: "{stream}"
297
298     scm:
299       - gerrit-trigger-scm:
300           credentials-id: "jenkins-gerrit-credentials"
301           refspec: "$GERRIT_REFSPEC"
302           choosing-strategy: "gerrit"
303
304     wrappers:
305       - fdio-infra-wrappers:
306           build-timeout: 120
307
308     triggers:
309       - gerrit-trigger-build:
310           name: "{project}"
311           branch: "{branch}"
312
313     builders:
314       - shell: !include-raw-escape:
315           - ../scripts/setup_executor_env.sh
316       - shell: !include-raw-escape:
317           - ../scripts/hicn/build.sh
318
319     publishers:
320       - fdio-infra-publish
321
322 - job-template:
323     name: "hicn-merge-{stream}-{os}-{executor-arch}"
324
325     project-type: freestyle
326     node: "builder-{os}-prod-{executor-arch}"
327
328     properties:
329       - lf-infra-properties:
330           build-days-to-keep: "{build-days-to-keep}"
331
332     parameters:
333       - project-parameter:
334           project: "{project}"
335       - gerrit-parameter:
336           branch: "{branch}"
337       - os-parameter:
338           os: "{os}"
339       - stream-parameter:
340           stream: "{stream}"
341
342     scm:
343       - gerrit-trigger-scm:
344           credentials-id: "jenkins-gerrit-credentials"
345           refspec: ""
346           choosing-strategy: "default"
347
348     wrappers:
349       - fdio-infra-wrappers:
350           build-timeout: "{build-timeout}"
351
352     triggers:
353       - gerrit-trigger-patch-merged:
354           name: "{project}"
355           branch: "{branch}"
356
357     builders:
358       - config-file-provider:
359           files:
360             - file-id: ".packagecloud"
361               target: "/root/.packagecloud"
362       - config-file-provider:
363           files:
364             - file-id: "packagecloud_api"
365               target: "/root/packagecloud_api"
366       - shell: !include-raw-escape:
367           - ../scripts/setup_executor_env.sh
368       - shell: !include-raw-escape:
369           - ../scripts/hicn/checkstyle.sh
370       - shell: !include-raw-escape:
371           - ../scripts/hicn/build.sh
372       - shell: !include-raw-escape:
373           - ../scripts/packagecloud_push.sh
374
375     publishers:
376       - fdio-infra-publish
377
378 - job-template:
379     name: "hicn-extras-verify-{stream}-{os}-{executor-arch}"
380
381     project-type: freestyle
382     node: "builder-{os}-prod-{executor-arch}"
383     concurrent: true
384
385     properties:
386       - lf-infra-properties:
387           build-days-to-keep: "{build-days-to-keep}"
388
389     parameters:
390       - project-parameter:
391           project: "{project}"
392       - gerrit-parameter:
393           branch: "{branch}"
394       - os-parameter:
395           os: "{os}"
396       - stream-parameter:
397           stream: "{stream}"
398
399     scm:
400       - gerrit-trigger-scm:
401           credentials-id: "jenkins-gerrit-credentials"
402           refspec: "$GERRIT_REFSPEC"
403           choosing-strategy: "gerrit"
404
405     wrappers:
406       - fdio-infra-wrappers:
407           build-timeout: 120
408
409     triggers:
410       - gerrit:
411           server-name: "Primary"
412           trigger-on:
413             - comment-added-contains-event:
414                 comment-contains-value: "verify-extras"
415           projects:
416             - project-compare-type: "ANT"
417               project-pattern: "{project}"
418               branches:
419                 - branch-compare-type: "ANT"
420                   branch-pattern: "**/{branch}"
421
422     builders:
423       - shell: !include-raw-escape:
424           - ../scripts/setup_executor_env.sh
425       - shell: !include-raw-escape:
426           - ../scripts/hicn/build-extras.sh
427
428     publishers:
429       - fdio-infra-publish
430
431 - job-template:
432     name: "hicn-extras-build-{stream}-{os}-{executor-arch}"
433
434     project-type: freestyle
435     node: "builder-{os}-prod-{executor-arch}"
436
437     properties:
438       - lf-infra-properties:
439           build-days-to-keep: "{build-days-to-keep}"
440
441     parameters:
442       - project-parameter:
443           project: "{project}"
444       - gerrit-parameter:
445           branch: "{branch}"
446       - os-parameter:
447           os: "{os}"
448       - stream-parameter:
449           stream: "hicn"
450
451     scm:
452       - gerrit-trigger-scm:
453           credentials-id: "jenkins-gerrit-credentials"
454           refspec: ""
455           choosing-strategy: "default"
456
457     wrappers:
458       - fdio-infra-wrappers:
459           build-timeout: "{build-timeout}"
460
461     triggers:
462       - gerrit:
463           server-name: "Primary"
464           trigger-on:
465             - comment-added-contains-event:
466                 comment-contains-value: "build-extras"
467           projects:
468             - project-compare-type: "ANT"
469               project-pattern: "{project}"
470               branches:
471                 - branch-compare-type: "ANT"
472                   branch-pattern: "**/{branch}"
473
474     builders:
475       - config-file-provider:
476           files:
477             - file-id: ".packagecloud"
478               target: "/root/.packagecloud"
479       - config-file-provider:
480           files:
481             - file-id: "packagecloud_api"
482               target: "/root/packagecloud_api"
483       - shell: !include-raw-escape:
484           - ../scripts/setup_executor_env.sh
485       - shell: !include-raw-escape:
486           - ../scripts/hicn/build-extras.sh
487       - shell: !include-raw-escape:
488           - ../scripts/packagecloud_push.sh
489
490     publishers:
491       - fdio-infra-publish
492
493 - project:
494     name: hicn-info
495     project-name: hicn
496     jobs:
497       - gerrit-info-yaml-verify
498     build-node: centos7-builder-2c-2g
499     project: hicn
500     branch: master