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