Merge "Import jjb test bash functions from vpp repo."
[ci-management.git] / jjb / csit / csit-vpp-device.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-vpp-device
17     description: 'CSIT jenkins jobs.'
18     os:
19       - 'ubuntu1804'
20     node-arch:
21       - '1n-skx'
22       - '1n-tx2':
23           executor: 'vpp-csit-arm-ubuntu18'
24           skip-vote: 'true'
25     jobs:
26       - 'csit-vpp-device-{stream}-{os}-{node-arch}'
27       - 'csit-vpp-device-{stream}-{os}-{node-arch}-semiweekly':
28           stream:
29             - master:
30                 branch: 'master'
31                 branch-id: 'oper'
32             - '2009_lts':
33                 branch: 'rls2009_lts'
34                 branch-id: 'oper-rls2009_lts'
35             - '2101':
36                 branch: 'rls2101'
37                 branch-id: 'oper-rls2101'
38       - 'csit-vpp-device-{stream}-{os}-{node-arch}-weekly':
39           stream:
40             - master:
41                 branch: 'master'
42                 branch-id: 'oper'
43             - '2009_lts':
44                 branch: 'rls2009_lts'
45                 branch-id: 'oper-rls2009_lts'
46             - '2101':
47                 branch: 'rls2101'
48                 branch-id: 'oper-rls2101'
49
50     project: 'csit'
51     executor: 'vpp-csit-device'
52     branch: 'master'
53     branch-id: 'oper'
54     stream:
55       - master:
56           branch: 'master'
57           branch-id: 'oper'
58       - '2005':
59           branch: 'rls2005'
60           branch-id: 'oper-rls2005'
61       - '2009':
62           branch: 'rls2009'
63           branch-id: 'oper-rls2009'
64       - '2009_lts':
65           branch: 'rls2009_lts'
66           branch-id: 'oper-rls2009_lts'
67       - '2101':
68           branch: 'rls2101'
69           branch-id: 'oper-rls2101'
70     exclude:
71       - stream: '2005'
72         node-arch: '1n-tx2'
73
74 - job-template:
75     name: 'csit-vpp-device-{stream}-{os}-{node-arch}'
76     description: |
77       <ul>
78           <li>objective
79               <ul>
80                   <li>vpp-device verify - per csit gerrit patch
81               </ul>
82           <li>job
83               <ul>
84                   <li>name: <b>csit-vpp-device-{stream}-{os}-{node-arch}</b>
85                   <li>trigger: keyword in comment to csit patch:
86                       <b>csit-devicetest tag_list</b>
87               </ul>
88           <li>executor
89               <ul>
90                   <li>{executor}
91               </ul>
92           <li>test-cases selection
93               <ul>
94                   <li>test-cases selected using trigger keyword followed by tags
95                   <li>all test-cases are labelled with CSIT RF topic tags
96                       defined in <i>csit/docs/tag_documentation.rst</i>
97               </ul>
98           <li>default tags for vpp-device test type
99               <ul>
100                   <li>devicetest
101               </ul>
102           <li>results
103               <ul>
104                   <li>jjb verify: PASS/FAIL
105                   <li>present: no
106                   <li>analyse: no
107               </ul>
108       </ul>
109
110     project-type: freestyle
111     node: '{executor}'
112     concurrent: true
113     archive-artifacts: 'archive/*.*'
114     latest-only: false
115
116     build-discarder:
117       daysToKeep: '{build-days-to-keep}'
118       numToKeep: '{build-num-to-keep}'
119       artifactDaysToKeep: '{build-artifact-days-to-keep}'
120       artifactNumToKeep: '{build-artifact-num-to-keep}'
121
122     parameters:
123       - project-parameter:
124           project: '{project}'
125       - gerrit-parameter:
126           branch: '{branch}'
127       - os-parameter:
128           os: '{os}'
129       - gerrit-refspec-parameter
130       - gerrit-event-type-parameter
131       - gerrit-event-comment-text-parameter
132       - string:
133           name: ARCHIVE_ARTIFACTS
134           default: '{archive-artifacts}'
135           description: Artifacts to archive to the logs server.
136       # This is an automatic verify job, part of API coverage.
137       # CRC checking is needed to ensure vpp crc job breaks only when intended.
138       # Unlikely to be removed, as this job is primary source of API coverage.
139       - csit-fail-on-crc-mismatch-parameter:
140           fail-on-crc-mismatch: 'True'
141
142     scm:
143       - gerrit-trigger-scm:
144           credentials-id: 'jenkins-gerrit-credentials'
145           refspec: '$GERRIT_REFSPEC'
146           choosing-strategy: 'gerrit'
147
148     wrappers:
149       - fdio-infra-wrappers:
150           build-timeout: '{build-timeout}'
151
152     triggers:
153       - gerrit-trigger-csit-vpp-devicetest-full:
154           project: '{project}'
155           branch: '{branch}'
156           skip-vote: '{skip-vote}'
157
158     builders:
159       - shell:
160           !include-raw-escape:
161           - ../scripts/setup_executor_env.sh
162       - shell:
163           !include-raw-escape:
164           - ../scripts/csit/device-verify.sh
165
166     publishers:
167       - robot:
168           output-path: 'archives'
169           other-files:
170             - '*.*'
171       - fdio-infra-shiplogs:
172           maven-version: 'mvn33-new'
173
174 - job-template:
175     name: 'csit-vpp-device-{stream}-{os}-{node-arch}-semiweekly'
176     description: |
177       <ul>
178           <li>objective
179               <ul>
180                   <li>Validate latest vpp build from corresponding branch stored
181                       in nexus against verified CSIT codebase of corresponding
182                       branch.
183               </ul>
184           <li>executor
185               <ul>
186                   <li>{executor}
187               </ul>
188           <li>test-cases selection
189               <ul>
190                   <li>pre-selected test-cases
191                   <li>all test-cases are labelled with CSIT RF topic tags
192                       defined in <i>csit/docs/tag_documentation.rst</i>
193               </ul>
194           <li>default tags for vpp-device test type
195               <ul>
196                   <li>devicetest
197               </ul>
198           <li>results
199               <ul>
200                   <li>jjb verify: PASS/FAIL
201                   <li>present: no
202                   <li>analyse: no
203               </ul>
204       </ul>
205
206     project-type: freestyle
207     node: '{executor}'
208     concurrent: false
209     archive-artifacts: 'csit/archive/*.*'
210     latest-only: false
211
212     build-discarder:
213       daysToKeep: '{build-days-to-keep}'
214       numToKeep: '{build-num-to-keep}'
215       artifactDaysToKeep: '{build-artifact-days-to-keep}'
216       artifactNumToKeep: '{build-artifact-num-to-keep}'
217
218     parameters:
219       - project-parameter:
220           project: '{project}'
221       - gerrit-parameter:
222           branch: '{branch}'
223       - os-parameter:
224           os: '{os}'
225       - string:
226           name: ARCHIVE_ARTIFACTS
227           default: '{archive-artifacts}'
228           description: Artifacts to archive to the logs server.
229
230     wrappers:
231       - fdio-infra-wrappers-non-activity-timeout:
232           build-timeout: '{build-timeout}'
233
234     triggers:
235       - timed: '0 4 * * 2,6'
236
237       - gerrit-trigger-manually-triggered:
238           comment-trigger-value: 'csit-verify-vpp'
239           name: '{project}'
240           branch: '{branch}'
241
242     builders:
243       - shell: 'echo "BRANCH_ID={branch-id}" > $WORKSPACE/variables.prop'
244       - inject:
245           properties-file: variables.prop
246       - shell:
247           !include-raw-escape:
248           - ../scripts/setup_executor_env.sh
249       - shell:
250           !include-raw-escape:
251           - ../scripts/csit/device-semiweekly.sh
252
253     publishers:
254       - robot:
255           output-path: 'archives'
256           other-files:
257             - '*.*'
258       - fdio-infra-shiplogs:
259           maven-version: 'mvn33-new'
260
261 - job-template:
262     name: 'csit-vpp-device-{stream}-{os}-{node-arch}-weekly'
263     description: |
264       <ul>
265           <li>objective
266               <ul>
267                   <li>Validate CSIT code of corresponding branch against
268                       verified vpp build from corresponding branch.
269               </ul>
270           <li>executor
271               <ul>
272                   <li>{executor}
273               </ul>
274           <li>test-cases selection
275               <ul>
276                   <li>pre-selected test-cases
277                   <li>all test-cases are labelled with CSIT RF topic tags
278                       defined in <i>csit/docs/tag_documentation.rst</i>
279               </ul>
280           <li>default tags for vpp-device test type
281               <ul>
282                   <li>devicetest
283               </ul>
284           <li>results
285               <ul>
286                   <li>jjb verify: PASS/FAIL
287                   <li>present: no
288                   <li>analyse: no
289               </ul>
290       </ul>
291
292     project-type: freestyle
293     node: '{executor}'
294     concurrent: false
295     archive-artifacts: 'archive/*.*'
296     latest-only: false
297
298     build-discarder:
299       daysToKeep: '{build-days-to-keep}'
300       numToKeep: '{build-num-to-keep}'
301       artifactDaysToKeep: '{build-artifact-days-to-keep}'
302       artifactNumToKeep: '{build-artifact-num-to-keep}'
303
304     parameters:
305       - project-parameter:
306           project: '{project}'
307       - gerrit-parameter:
308           branch: '{branch}'
309       - os-parameter:
310           os: '{os}'
311       - string:
312           name: ARCHIVE_ARTIFACTS
313           default: '{archive-artifacts}'
314           description: Artifacts to archive to the logs server.
315
316     scm:
317       - git-scm:
318           credentials-id: 'jenkins-gerrit-credentials'
319           branch: '{branch}'
320
321     wrappers:
322       - fdio-infra-wrappers-non-activity-timeout:
323           build-timeout: '{build-timeout}'
324
325     triggers:
326       - timed: '0 4 * * 0'
327
328       - gerrit-trigger-manually-triggered:
329           comment-trigger-value: 'csit-vpp-ref-verify'
330           name: '{project}'
331           branch: '{branch}'
332
333     builders:
334       - shell:
335           !include-raw-escape:
336           - ../scripts/setup_executor_env.sh
337       - shell:
338           !include-raw-escape:
339           - ../scripts/csit/device-verify.sh
340
341     publishers:
342       - robot:
343           output-path: 'archives'
344           other-files:
345             - '*.*'
346       - fdio-infra-shiplogs:
347           maven-version: 'mvn33-new'