Merge "Update sandbox bash functions"
[ci-management.git] / jjb / csit / csit.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: csit
17     description: 'CSIT Jenkins jobs.'
18
19     jobs:
20       - 'csit-docs-merge-{stream}-{os}-{executor-arch}'
21       - 'csit-report-merge-{stream}-{os}-{executor-arch}'
22       - 'csit-trending-daily-master-{os}-{executor-arch}'
23       - 'csit-trending-weekly-2009-lts-{os}-{executor-arch}'
24
25     project: 'csit'
26     branch: 'master'
27     os:
28       - 'ubuntu2004'
29     executor-arch: 'x86_64'
30     build-artifact-num-to-keep: 10
31     stream:
32       - master:
33           branch: 'master'
34       - '2005':
35           branch: 'rls2005'
36       - '2009':
37           branch: 'rls2009'
38       - '2009_lts':
39           branch: 'rls2009_lts'
40       - '2101':
41           branch: 'rls2101'
42
43 - project:
44     name: csit-view
45     views:
46       - project-view
47     project-name: csit
48
49 - job-template:
50     name: 'csit-docs-merge-{stream}-{os}-{executor-arch}'
51
52     project-type: freestyle
53     node: 'builder-{os}-prod-{executor-arch}'
54     concurrent: true
55     allow-empty: 'true'
56     fingerprint: false
57     only-if-success: true
58     default-excludes: false
59
60     build-discarder:
61       daysToKeep: '{build-days-to-keep}'
62       numToKeep: '{build-num-to-keep}'
63       artifactDaysToKeep: '{build-artifact-days-to-keep}'
64       artifactNumToKeep: '{build-artifact-num-to-keep}'
65
66     parameters:
67       - project-parameter:
68           project: '{project}'
69       - gerrit-parameter:
70           branch: '{branch}'
71       - maven-exec:
72           maven-version: 'mvn33-new'
73       - string:
74           name: ARCHIVE_ARTIFACTS
75           default: '{archive-artifacts}'
76           description: Artifacts to archive to the logs server.
77
78     scm:
79       - gerrit-trigger-scm:
80           credentials-id: 'jenkins-gerrit-credentials'
81           refspec: ''
82           choosing-strategy: 'default'
83
84     wrappers:
85       - fdio-infra-wrappers-non-activity-timeout:
86           build-timeout: '{build-timeout}'
87
88     triggers:
89       - reverse:
90           jobs: 'csit-vpp-device-{stream}-ubuntu1804-1n-skx-weekly'
91           result: 'success'
92       - gerrit:
93           server-name: 'Primary'
94           trigger-on:
95             - comment-added-contains-event:
96                 comment-contains-value: 'run-docs'
97           projects:
98             - project-compare-type: 'ANT'
99               project-pattern: '{project}'
100               branches:
101                 - branch-compare-type: 'ANT'
102                   branch-pattern: '**/{branch}'
103           skip-vote:
104             successful: true
105             failed: true
106             unstable: true
107             notbuilt: true
108
109     builders:
110       - maven-target:
111           maven-version: 'mvn33-new'
112           goals: '--version'
113           settings: 'csit-settings'
114           settings-type: cfp
115           global-settings: 'global-settings'
116           global-settings-type: cfp
117       - provide-maven-settings:
118           settings-file: 'csit-settings'
119           global-settings-file: 'global-settings'
120       - shell:
121           !include-raw-escape:
122           - ../scripts/setup_executor_env.sh
123       - shell:
124           !include-raw-escape:
125           - ../scripts/csit/docs.sh
126
127     publishers:
128       - fdio-infra-shiplogs:
129           maven-version: 'mvn33-new'
130
131 - job-template:
132     name: 'csit-report-merge-{stream}-{os}-{executor-arch}'
133
134     project-type: freestyle
135     node: 'builder-{os}-prod-{executor-arch}'
136     concurrent: false
137     allow-empty: 'true'
138     fingerprint: false
139     only-if-success: true
140     default-excludes: false
141
142     build-discarder:
143       daysToKeep: '{build-days-to-keep}'
144       numToKeep: '{build-num-to-keep}'
145       artifactDaysToKeep: '{build-artifact-days-to-keep}'
146       artifactNumToKeep: '{build-artifact-num-to-keep}'
147
148     parameters:
149       - project-parameter:
150           project: '{project}'
151       - gerrit-parameter:
152           branch: '{branch}'
153       - maven-exec:
154           maven-version: 'mvn33-new'
155       - string:
156           name: ARCHIVE_ARTIFACTS
157           default: '{archive-artifacts}'
158           description: Artifacts to archive to the logs server.
159
160     scm:
161       - gerrit-trigger-scm:
162           credentials-id: 'jenkins-gerrit-credentials'
163           refspec: '$GERRIT_REFSPEC'
164           choosing-strategy: 'default'
165
166     wrappers:
167       - fdio-infra-wrappers-non-activity-timeout:
168           build-timeout: '{build-timeout}'
169
170     triggers:
171       - gerrit:
172           server-name: 'Primary'
173           trigger-on:
174             - comment-added-contains-event:
175                 comment-contains-value: 'run-report'
176           projects:
177             - project-compare-type: 'ANT'
178               project-pattern: '{project}'
179               branches:
180                 - branch-compare-type: 'ANT'
181                   branch-pattern: '**/{branch}'
182           skip-vote:
183             successful: true
184             failed: true
185             unstable: true
186             notbuilt: true
187
188     builders:
189       - maven-target:
190           maven-version: 'mvn33-new'
191           goals: '--version'
192           settings: 'csit-settings'
193           settings-type: cfp
194           global-settings: 'global-settings'
195           global-settings-type: cfp
196       - provide-maven-settings:
197           settings-file: 'csit-settings'
198           global-settings-file: 'global-settings'
199       - shell:
200           !include-raw-escape:
201           - ../scripts/setup_executor_env.sh
202       - shell:
203           !include-raw-escape:
204           - ../scripts/csit/report.sh
205
206     publishers:
207       - fdio-infra-shiplogs:
208           maven-version: 'mvn33-new'
209
210 - job-template:
211     name: 'csit-trending-daily-master-{os}-{executor-arch}'
212
213     project-type: freestyle
214     node: 'builder-{os}-prod-{executor-arch}'
215     concurrent: false
216
217     build-discarder:
218       daysToKeep: '{build-days-to-keep}'
219       numToKeep: '{build-num-to-keep}'
220       artifactDaysToKeep: '{build-artifact-days-to-keep}'
221       artifactNumToKeep: '{build-artifact-num-to-keep}'
222
223     parameters:
224       - project-parameter:
225           project: '{project}'
226       - gerrit-parameter:
227           branch: '{branch}'
228       - maven-exec:
229           maven-version: 'mvn33-new'
230
231     scm:
232       - gerrit-trigger-scm:
233           credentials-id: 'jenkins-gerrit-credentials'
234           refspec: ''
235           choosing-strategy: 'default'
236
237     wrappers:
238       - fdio-infra-wrappers-non-activity-timeout:
239           build-timeout: '{build-timeout}'
240
241     triggers:
242       - timed: '0 2,14 * * *'
243
244     builders:
245       - maven-target:
246           maven-version: 'mvn33-new'
247           goals: '--version'
248           settings: 'csit-settings'
249           settings-type: cfp
250           global-settings: 'global-settings'
251           global-settings-type: cfp
252       - provide-maven-settings:
253           settings-file: 'csit-settings'
254           global-settings-file: 'global-settings'
255       - shell:
256           !include-raw-escape:
257           - ../scripts/setup_executor_env.sh
258       - shell:
259           !include-raw-escape:
260           - ../scripts/csit/cpta.sh
261
262     publishers:
263       - email-ext:
264           # yamllint disable-line rule:line-length
265           recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
266           reply-to: ''
267           content-type: 'text'
268           subject: 'Failed tests as of  $BUILD_TIMESTAMP'
269           # yamllint disable-line rule:line-length
270           body: |
271                 Following tests failed in the last trending job runs, listed per testbed type.
272
273                 ${{FILE,path="build-root/docs/deploy-site/src/site/resources/trending/_static/vpp/trending-failed-tests.txt"}}
274
275           always: true
276           failure: false
277
278       - email-ext:
279           # yamllint disable-line rule:line-length
280           recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
281           reply-to: ''
282           content-type: 'text'
283           subject: 'Regressions as of  $BUILD_TIMESTAMP'
284           # yamllint disable-line rule:line-length
285           body: |
286                 Following regressions occured in the last trending job runs, listed per testbed type.
287
288                 ${{FILE,path="build-root/docs/deploy-site/src/site/resources/trending/_static/vpp/trending-regressions.txt"}}
289
290           always: true
291           failure: false
292
293       - email-ext:
294           # yamllint disable-line rule:line-length
295           recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
296           reply-to: ''
297           content-type: 'text'
298           subject: 'Progressions as of  $BUILD_TIMESTAMP'
299           # yamllint disable-line rule:line-length
300           body: |
301                 Following progressions occured in the last trending job runs, listed per testbed type.
302
303                 ${{FILE,path="build-root/docs/deploy-site/src/site/resources/trending/_static/vpp/trending-progressions.txt"}}
304
305           always: true
306           failure: false
307
308       - fdio-infra-shiplogs:
309           maven-version: 'mvn33-new'
310
311 - job-template:
312     name: 'csit-trending-weekly-2009-lts-{os}-{executor-arch}'
313
314     project-type: freestyle
315     node: 'builder-{os}-prod-{executor-arch}'
316     concurrent: false
317
318     build-discarder:
319       daysToKeep: '{build-days-to-keep}'
320       numToKeep: '{build-num-to-keep}'
321       artifactDaysToKeep: '{build-artifact-days-to-keep}'
322       artifactNumToKeep: '{build-artifact-num-to-keep}'
323
324     parameters:
325       - project-parameter:
326           project: '{project}'
327       - gerrit-parameter:
328           branch: 'rls2009_lts'
329       - maven-exec:
330           maven-version: 'mvn33-new'
331
332     scm:
333       - gerrit-trigger-scm:
334           credentials-id: 'jenkins-gerrit-credentials'
335           refspec: ''
336           choosing-strategy: 'default'
337
338     wrappers:
339       - fdio-infra-wrappers-non-activity-timeout:
340           build-timeout: '{build-timeout}'
341
342     triggers:
343       - timed: '0 0 * * 1'
344
345     builders:
346       - maven-target:
347           maven-version: 'mvn33-new'
348           goals: '--version'
349           settings: 'csit-settings'
350           settings-type: cfp
351           global-settings: 'global-settings'
352           global-settings-type: cfp
353       - provide-maven-settings:
354           settings-file: 'csit-settings'
355           global-settings-file: 'global-settings'
356       - shell:
357           !include-raw-escape:
358           - ../scripts/setup_executor_env.sh
359       - shell:
360           !include-raw-escape:
361           - ../scripts/csit/cpta.sh
362
363     publishers:
364       - email-ext:
365           # yamllint disable-line rule:line-length
366           recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
367           reply-to: ''
368           content-type: 'text'
369           subject: '2009 LTS: Failed tests as of  $BUILD_TIMESTAMP'
370           # yamllint disable-line rule:line-length
371           body: |
372                 Following tests failed in the last trending job runs, listed per testbed type.
373
374                 ${{FILE,path="build-root/docs/deploy-site/src/site/resources/trending/_static/vpp/trending-failed-tests.txt"}}
375
376           always: true
377           failure: false
378
379       - email-ext:
380           # yamllint disable-line rule:line-length
381           recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
382           reply-to: ''
383           content-type: 'text'
384           subject: '2009 LTS: Regressions as of  $BUILD_TIMESTAMP'
385           # yamllint disable-line rule:line-length
386           body: |
387                 Following regressions occured in the last trending job runs, listed per testbed type.
388
389                 ${{FILE,path="build-root/docs/deploy-site/src/site/resources/trending/_static/vpp/trending-regressions.txt"}}
390
391           always: true
392           failure: false
393
394       - email-ext:
395           # yamllint disable-line rule:line-length
396           recipients: 'tifrank@cisco.com, csit-report+int+616+181919729795594561@lists.fd.io'
397           reply-to: ''
398           content-type: 'text'
399           subject: '2009 LTS: Progressions as of  $BUILD_TIMESTAMP'
400           # yamllint disable-line rule:line-length
401           body: |
402                 Following progressions occured in the last trending job runs, listed per testbed type.
403
404                 ${{FILE,path="build-root/docs/deploy-site/src/site/resources/trending/_static/vpp/trending-progressions.txt"}}
405
406           always: true
407           failure: false
408
409       - fdio-infra-shiplogs:
410           maven-version: 'mvn33-new'
411
412 - project:
413     name: csit-info
414     project-name: csit
415     jobs:
416       - gerrit-info-yaml-verify
417     build-node: centos7-builder-2c-2g
418     project: csit
419     branch: master
420
421 - project:
422     name: csit-sonar
423     project: csit
424     project-name: csit
425     mvn-settings: csit-settings
426     sonarcloud: true
427     sonarcloud-project-organization: '{sonarcloud_project_organization}'
428     sonarcloud-api-token: '{sonarcloud_api_token}'
429     sonarcloud-project-key: '{sonarcloud_project_organization}_{project-name}'
430     branch: master
431     build-node: centos7-builder-2c-2g
432     jobs:
433       - gerrit-maven-sonar