jjb/lava: Parameterize repo URL and branch for test scripts
[lttng-ci.git] / jobs / system-tests.yaml
1 ---
2 ## Anchors
3 - _system_tests_parameters_defaults: &system_tests_parameters_defaults
4 name: 'system_tests_parameters_defaults'
5 parameters:
6 - string:
7 name: 'LTTNG_TOOLS_COMMIT_ID'
8 default: ''
9 description: 'The lttng-tools commit id to build.'
10 - string:
11 name: 'LTTNG_MODULES_COMMIT_ID'
12 default: ''
13 description: 'The lttng-modules commit id to build.'
14 - string:
15 name: 'LTTNG_UST_COMMIT_ID'
16 default: ''
17 description: 'The lttng-ust commit id to build.'
18 - string:
19 name: 'KERNEL_TAG_ID'
20 default: ''
21 description: 'The linux kernel git tag to build against.'
22 - string:
23 name: 'KERNEL_REPO'
24 default: 'git://git-mirror.internal.efficios.com/kernel/stable/linux-stable.git'
25 description: 'Linux kernel git repo to checkout the kernel id'
26 - string:
27 name: 'LTTNG_TOOLS_REPO'
28 default: 'https://github.com/lttng/lttng-tools.git'
29 description: 'LTTng-Tools git repo to checkout the tools id'
30 - string:
31 name: 'LTTNG_MODULES_REPO'
32 default: 'https://github.com/lttng/lttng-modules.git'
33 description: 'LTTng-Modules git repo to checkout the Modules id'
34 - string:
35 name: 'LTTNG_UST_REPO'
36 default: 'https://github.com/lttng/lttng-ust.git'
37 description: 'LTTng-UST git repo to checkout the UST id'
38 - string:
39 name: 'ROOTFS_URL'
40 default: 'https://obj.internal.efficios.com/lava/rootfs/rootfs_amd64_xenial_2018-12-05.tar.gz'
41 description: 'The URL at which the system root FS can be downloaded'
42 - string:
43 name: 'LTTNG_CI_REPO'
44 default: 'https://github.com/lttng/lttng-ci.git'
45 description: 'LTTng-ci git repo to checkout the CI scripts'
46 - string:
47 name: 'LTTNG_CI_BRANCH'
48 default: 'master'
49 description: 'The branch of the CI repository to clone for job scripts'
50
51 - publisher:
52 name: 'system_tests_email_ext_default'
53 publishers:
54 - email-ext:
55 recipients: 'ci-notification@lists.lttng.org, cc:francis.deslauriers@efficios.com'
56 reply-to: ci-notification@lists.lttng.org
57 always: false
58 unstable: false
59 first-failure: true
60 first-unstable: true
61 not-built: false
62 aborted: false
63 regression: false
64 failure: false
65 second-failure: false
66 improvement: false
67 still-failing: false
68 success: false
69 fixed: false
70 fixed-unhealthy: true
71 still-unstable: false
72 pre-build: false
73 matrix-trigger: only-parent
74 send-to:
75 - recipients
76
77 - job-template:
78 name: vm_tests_k{kversion}_l{lttngversion}
79 description: |
80 Runs root_regression and root_destructive_tests on a virtual machine over different combinations of kernel and lttng configurations.
81 project-type: freestyle
82 node: 'amd64'
83 <<: *system_tests_parameters_defaults
84
85 properties:
86 - build-discarder:
87 num-to-keep: 10
88 - throttle:
89 max-total: 4
90 option: 'category'
91 categories:
92 - 'kvm-tests'
93
94 wrappers:
95 - workspace-cleanup
96 - timestamps
97 - ansicolor
98 - credentials-binding:
99 - text:
100 credential-id: jenkins_lava_key
101 variable: LAVA_JENKINS_TOKEN
102 - text:
103 credential-id: jenkins_lava2_key
104 variable: LAVA2_JENKINS_TOKEN
105 - inject:
106 properties-content: |
107 BUILD_DEVICE=kvm
108 LTTNG_VERSION={lttngversion}
109 LTTNG_CI_REPO=${{LTTNG_CI_REPO}}
110 LTTNG_CI_BRANCH=${{LTTNG_CI_BRANCH}}
111
112 scm:
113 - git:
114 url: "${{LTTNG_CI_REPO}}"
115 basedir: src/lttng-ci/
116 branches:
117 - "${{LTTNG_CI_BRANCH}}"
118
119 builders:
120 - shell: !include-raw-escape: scripts/system-tests/generate-properties-master.sh
121 - trigger-builds:
122 - project: "build_kernel_PARAM"
123 property-file: 'properties.txt'
124 block: true
125 - inject:
126 properties-file: properties.txt
127 - shell: !include-raw-escape: scripts/system-tests/run-kvm-tests.sh
128
129 publishers:
130 - workspace-cleanup
131 - email-ext:
132 recipients: '{obj:email_to}'
133 always: false
134 unstable: false
135 first-failure: true
136 first-unstable: true
137 not-built: false
138 aborted: false
139 regression: false
140 failure: false
141 second-failure: false
142 improvement: false
143 still-failing: true
144 success: false
145 fixed: false
146 fixed-unhealthy: true
147 still-unstable: false
148 pre-build: false
149 matrix-trigger: only-parent
150 send-to:
151 - recipients
152
153 - job-template:
154 name: baremetal_tests_k{kversion}_l{lttngversion}
155 description: |
156 Runs perf_regression tests on a baremetal machine over different combinations of kernel and lttng configurations.
157 project-type: freestyle
158 node: 'amd64'
159
160 <<: *system_tests_parameters_defaults
161
162 properties:
163 - build-discarder:
164 num-to-keep: 10
165 artifact-num-to-keep: 2
166 - throttle:
167 max-total: 2
168 option: 'category'
169 categories:
170 - 'baremetal-tests'
171
172 wrappers:
173 - workspace-cleanup
174 - timestamps
175 - ansicolor
176 - credentials-binding:
177 - text:
178 credential-id: jenkins_lava_key
179 variable: LAVA_JENKINS_TOKEN
180 - text:
181 credential-id: jenkins_lava2_key
182 variable: LAVA2_JENKINS_TOKEN
183 - inject:
184 properties-content: |
185 BUILD_DEVICE=baremetal
186 LTTNG_VERSION={lttngversion}
187 LTTNG_CI_REPO=${{LTTNG_CI_REPO}}
188 LTTNG_CI_BRANCH=${{LTTNG_CI_BRANCH}}
189
190 scm:
191 - git:
192 url: "${{LTTNG_CI_REPO}}"
193 basedir: src/lttng-ci/
194 branches:
195 - "${{LTTNG_CI_BRANCH}}"
196
197 builders:
198 - shell: !include-raw-escape: scripts/system-tests/generate-properties-master.sh
199 - trigger-builds:
200 - project: "build_kernel_PARAM"
201 property-file: 'properties.txt'
202 block: true
203 - inject:
204 properties-file: properties.txt
205 - shell: !include-raw-escape: scripts/system-tests/run-baremetal-tests.sh
206
207 publishers:
208 - workspace-cleanup
209
210 - job-template:
211 name: build_kernel_PARAM
212 description: |
213 Builds a Linux Kernel and LTTng Modules if necessary
214 concurrent: true
215 node: 'amd64'
216
217 parameters:
218 - string:
219 name: 'LTTNG_MODULES_COMMIT_ID'
220 description: 'The lttng-modules commmit to build.'
221 - string:
222 name: 'LTTNG_MODULES_REPO'
223 description: 'The LTTng Modules git repo to fetch from'
224 default: 'git://git-mirror.internal.efficios.com/lttng/lttng-modules.git'
225 - string:
226 name: 'KERNEL_COMMIT_ID'
227 description: 'The kernel commit to build.'
228 - string:
229 name: 'KGITREPO'
230 description: 'The kernel git repo to fetch from'
231 - string:
232 name: 'STORAGE_KERNEL_FOLDER'
233 description: 'Path to store the Kernel image'
234 - string:
235 name: 'STORAGE_KERNEL_IMAGE'
236 description: 'Path to store the Kernel IMAGE'
237 - string:
238 name: 'STORAGE_LINUX_MODULES'
239 description: 'Path to store the Kernel Modules'
240 - string:
241 name: 'STORAGE_LTTNG_MODULES'
242 description: 'Path to store the LTTng Modules'
243 - string:
244 name: 'BUILD_DEVICE'
245 description: 'The target device. (kvm or baremetal)'
246 - string:
247 name: 'S3_STORAGE_KERNEL_FOLDER'
248 description: 'Path to store the Kernel image'
249 - string:
250 name: 'S3_STORAGE_KERNEL_IMAGE'
251 description: 'Path to store the Kernel IMAGE'
252 - string:
253 name: 'S3_STORAGE_LINUX_MODULES'
254 description: 'Path to store the Kernel Modules'
255 - string:
256 name: 'S3_STORAGE_LTTNG_MODULES'
257 description: 'Path to store the LTTng Modules'
258 - string:
259 name: 'LTTNG_CI_REPO'
260 default: 'https://github.com/lttng/lttng-ci.git'
261 description: 'LTTng-ci git repo to checkout the CI scripts'
262 - string:
263 name: 'LTTNG_CI_BRANCH'
264 default: 'master'
265 description: 'The branch of the CI repository to clone for job scripts'
266
267 properties:
268 - build-discarder:
269 num-to-keep: 100
270
271 wrappers:
272 - workspace-cleanup
273 - timestamps
274 - ansicolor
275 - credentials-binding:
276 - file:
277 credential-id: system_tests_storage_key
278 variable: identity_file
279
280 scm:
281 - git:
282 url: "${{LTTNG_CI_REPO}}"
283 basedir: src/lttng-ci/
284 branches:
285 - "${{LTTNG_CI_BRANCH}}"
286
287 builders:
288 - shell: !include-raw-escape: scripts/system-tests/checkout-modules.sh
289 - shell: !include-raw-escape: scripts/system-tests/generate-properties-slave.sh
290 - inject:
291 properties-file: properties.txt
292 - shell: !include-raw-escape: scripts/system-tests/check-build-needs.sh
293 - conditional-step:
294 condition-kind: not
295 condition-operand:
296 condition-kind: file-exists
297 condition-filename: kernel-built.txt
298 condition-basedir: workspace
299 steps:
300 - shell: !include-raw-escape: scripts/system-tests/build-kernel.sh
301 - conditional-step:
302 condition-kind: not
303 condition-operand:
304 condition-kind: file-exists
305 condition-filename: modules-built.txt
306 condition-basedir: workspace
307 steps:
308 - shell: !include-raw-escape: scripts/system-tests/build-modules.sh
309
310 publishers:
311 - workspace-cleanup
312
313 - job-template:
314 name: system_ALL_{test_type}_trigger
315 description: |
316 This job will trigger the build of jobs when a new tag is push specific
317 tracked Linux branches and new commits on LTTng tracked branches
318
319 project-type: freestyle
320 node: 'master'
321 parameters:
322 - bool:
323 name: 'FORCE_JOB_RUN'
324 default: false
325 description: 'Force the child jobs to run'
326 - bool:
327 name: 'FORCE_FAILED_JOB_RUN'
328 default: false
329 description: 'Force the failed child jobs to run'
330
331 properties:
332 - build-discarder:
333 num-to-keep: 10
334
335 triggers:
336 - timed: "H 0 * * 1-5"
337
338 wrappers:
339 - timestamps
340 - ansicolor
341
342 builders:
343 - system-groovy:
344 command:
345 !include-raw-escape: scripts/system-tests/system-trigger.groovy
346
347 publishers:
348 - system_tests_email_ext_default
349
350 ## Project
351
352 # Canary jobs are made to confirm that the whole Lava pipeline is working.
353 # They are scheduled once a day always on the same (LTTng, Kernel) code. If any
354 # of those jobs fails, it means that there is an issue with the configuration
355
356 # Only build the "supported" version against the master kernel since
357 # "unsupported" version do not get backport for new kernel.
358 - project:
359 name: system-tests-supported-kmaster
360 email_to: 'ci-notification@lists.lttng.org, cc:jgalar@efficios.com'
361 kversion:
362 - master
363 lttngversion:
364 - master
365 - stable-2.12
366 - stable-2.13
367 jobs:
368 - 'vm_tests_k{kversion}_l{lttngversion}'
369 - 'baremetal_tests_k{kversion}_l{lttngversion}'
370
371 # Test against particular linux version.
372 - project:
373 name: system-tests
374 email_to: 'ci-notification@lists.lttng.org, cc:jgalar@efficios.com'
375 kversion:
376 - canary
377 - linux-4.9.y
378 - linux-4.14.y
379 - linux-4.19.y
380 - linux-5.4.y
381 - linux-5.10.y
382 - linux-5.15.y
383 - linux-5.16.y
384 lttngversion:
385 - canary
386 - master
387 - stable-2.12
388 - stable-2.13
389 jobs:
390 - 'vm_tests_k{kversion}_l{lttngversion}'
391 - 'baremetal_tests_k{kversion}_l{lttngversion}'
392 - project:
393 name: system-tests-vm-only
394 email_to: 'ci-notification@lists.lttng.org, cc:jgalar@efficios.com'
395 kversion:
396 - linux-3.18.y
397 lttngversion:
398 - master
399 - stable-2.12
400 - stable-2.13
401 jobs:
402 - 'vm_tests_k{kversion}_l{lttngversion}'
403
404 - project:
405 name: system-general
406 test_type:
407 - vm_tests
408 - baremetal_tests
409 jobs:
410 - 'build_kernel_PARAM'
411 - 'system_ALL_{test_type}_trigger'
This page took 0.060847 seconds and 5 git commands to generate.