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