cdfcd355e6d6f829673075169517963f7bb84def
[lttng-ci.git] / jobs / images.yml
1 ---
2 ## Anchors
3 - _images_parameters_default: &images_parameters_imagebuilder_defaults
4 name: 'images_parameters_imagebuilder_defaults'
5 parameters:
6 - string: &images_parameters_OS
7 name: 'OS'
8 description: 'OS name'
9 default: 'debian'
10 required: true
11 - string: &images_parameters_RELEASE
12 name: 'RELEASE'
13 description: 'OS release number or name'
14 default: 'bookworm'
15 required: true
16 - choice: &images_parameters_ARCH
17 name: 'ARCH'
18 description: 'Target architecture'
19 choices:
20 - amd64
21 - i386
22 - arm64
23 - armhf
24 - ppc64el
25 - s390x
26 - riscv64
27 - string: &images_parameters_VARIANT
28 name: 'VARIANT'
29 default: 'cloud'
30 description: 'The base image variant to build off of'
31 required: true
32 - choice: &images_parameters_IMAGE_TYPE
33 name: 'IMAGE_TYPE'
34 choices:
35 - 'incus'
36 - 'vm'
37 description: 'The type of image to create'
38 - choice:
39 name: 'PROFILE'
40 choices:
41 - 'ci-node'
42 - 'developer'
43 description: 'The ansible group to apply to the image'
44 required: true
45 - string: &images_parameters_INCUS_HOST
46 name: 'INCUS_HOST'
47 default: 'ci-host-amd64-1a.internal.efficios.com'
48 description: 'The address of the incus cluster to publish to'
49 required: true
50 - string: &images_parameters_INCUS_INSTANCE_PROFILE
51 name: 'INCUS_INSTANCE_PROFILE'
52 default: 'ci-rootnode'
53 description: 'The Incus instance profile to use for temporary instances when building images'
54 required: true
55 - string: &images_parameters_GIT_URL
56 name: 'GIT_URL'
57 default: 'https://github.com/lttng/lttng-ci.git'
58 description: 'The source of the repo containing the ansible playbooks'
59 required: true
60 - string: &images_parameters_GIT_BRANCH
61 name: 'GIT_BRANCH'
62 default: 'master'
63 description: 'The branch or commit of the ansible playbook repo to checkout'
64 required: true
65 - bool: &images_parameters_TEST
66 name: 'TEST'
67 default: true
68 description: 'Enable to launch a container of the published image as a test'
69
70 - _images_parameters_default: &images_parameters_distrobuilder_defaults
71 name: 'images_parameters_distrobuilder_defaults'
72 parameters:
73 - string:
74 <<: *images_parameters_OS
75 - string:
76 <<: *images_parameters_RELEASE
77 - choice:
78 <<: *images_parameters_ARCH
79 - string:
80 <<: *images_parameters_VARIANT
81 - choice:
82 <<: *images_parameters_IMAGE_TYPE
83 - string:
84 <<: *images_parameters_INCUS_HOST
85 - string:
86 <<: *images_parameters_INCUS_INSTANCE_PROFILE
87 - string:
88 <<: *images_parameters_GIT_URL
89 - string:
90 <<: *images_parameters_GIT_BRANCH
91 - bool:
92 <<: *images_parameters_TEST
93 - string:
94 name: 'DISTROBUILDER_GIT_URL'
95 default: 'https://github.com/lxc/distrobuilder.git'
96 - string:
97 name: 'DISTROBUILDER_GIT_BRANCH'
98 default: 'main'
99 - string:
100 name: 'INCUS_CI_GIT_URL'
101 default: 'https://github.com/lxc/lxc-ci.git'
102 - string:
103 name: 'INCUS_CI_GIT_BRANCH'
104 default: 'main'
105 - string:
106 name: 'GO_VERSION'
107 default: '1.21.3'
108
109 - _images_properties_defaults: &images_properties_defaults
110 name: 'images_properties_defaults'
111 properties:
112 - build-discarder:
113 num-to-keep: 20
114 - throttle:
115 option: project
116 max-total: 4
117 matrix-builds: false
118
119 ## Defaults
120 - defaults:
121 name: imagebuilder
122 concurrent: true
123 description: |
124 <p>Job is managed by Jenkins Job Builder</p>
125 project-type: freestyle
126 publishers:
127 - workspace-cleanup
128 wrappers:
129 - workspace-cleanup
130 - timestamps
131 - ansicolor
132 - credentials-binding:
133 - ssh-user-private-key:
134 credential-id: 'f3c907b6-7485-49e1-afe1-4df24fac4ca1'
135 key-file-variable: SSH_PRIVATE_KEY
136 username-variable: SSH_USERNAME
137 passphrase-variable: SSH_PASSWORD
138 - file:
139 credential-id: 'f3f08275-59ef-42ff-9de5-9beafc7435b8'
140 variable: INCUS_CLIENT_CERT
141 - file:
142 credential-id: '0debf23b-191b-4cdf-8a25-04e9a7092a67'
143 variable: INCUS_CLIENT_KEY
144 - text:
145 credential-id: SLES_REGISTRATION_CODE_amd64
146 variable: SLES_REGISTRATION_CODE_amd64
147 # When it needs to match ansible_architecture
148 - text:
149 credential-id: SLES_REGISTRATION_CODE_amd64
150 variable: SLES_REGISTRATION_CODE_x86_64
151 - inject: {}
152
153 ## Templates
154 - job-template:
155 name: images_imagebuilder_{OS}
156 defaults: imagebuilder
157 description: |
158 This pipeline starts distrobuilder and imagebuilder jobs for {OS}
159
160 <p>Job is managed by Jenkins Job Builder</p>
161 project-type: pipeline
162 parameters: '{obj:parameters}'
163 IMAGE_TYPES:
164 - incus
165 - vm
166 PROFILES:
167 - ci-node
168 - developer
169 sandbox: true
170 dsl: !include-jinja2: pipelines/images/default.groovy
171
172 - job-template:
173 name: images_distrobuilder
174 defaults: imagebuilder
175 node: 'deb12-amd64-rootnode'
176 <<: *images_parameters_distrobuilder_defaults
177 <<: *images_properties_defaults
178 builders:
179 - shell: !include-raw-escape: pipelines/images/distrobuild.sh
180
181 - job-template:
182 name: images_imagebuilder
183 defaults: imagebuilder
184 node: 'deb12-amd64-rootnode'
185 <<: *images_parameters_imagebuilder_defaults
186 <<: *images_properties_defaults
187 builders:
188 - shell: !include-raw-escape: pipelines/images/imagebuild.sh
189
190
191 ## Views
192 - view-template:
193 name: 'Images'
194 view-type: list
195 regex: 'image.*'
196
197 ## Projects
198
199 - project:
200 name: images_imagebuilder_OS
201 OS:
202 - debian
203 ARCHES:
204 - i386
205 - amd64
206 RELEASES:
207 - bullseye
208 - bookworm
209 - trixie
210 - sid
211 jobs:
212 - 'images_imagebuilder_{OS}'
213 parameters:
214 - bool: &images_parameters_SKIP_BASE_IMAGES
215 name: 'SKIP_BASE_IMAGES'
216 default: false
217 - bool: &images_parameters_SKIP_PROFILE_IMAGES
218 name: 'SKIP_PROFILE_IMAGES'
219 default: false
220 - choice: &images_parameters_ARCH_FILTER
221 name: 'ARCH_FILTER'
222 choices:
223 - all
224 - amd64
225 - i386
226 - arm64
227 - armhf
228 - ppc64el
229 - riscv64
230 - s390x
231 - choice: &images_parameters_IMAGE_TYPE_FILTER
232 name: 'IMAGE_TYPE_FILTER'
233 choices:
234 - all
235 - incus
236 - vm
237 - choice: &images_parameters_PROFILE_FILTER
238 name: 'PROFILE_FILTER'
239 choices:
240 - all
241 - ci-node
242 - developer
243 - choice:
244 name: 'RELEASE_FILTER'
245 choices:
246 - all
247 - bullseye
248 - bookworm
249 - trixie
250 - sid
251 - string:
252 <<: *images_parameters_GIT_URL
253 - string:
254 <<: *images_parameters_GIT_BRANCH
255
256 - project:
257 name: images_imagebuilder_rockylinux
258 OS:
259 - rockylinux
260 ARCHES:
261 - amd64
262 RELEASES:
263 - '8'
264 - '9'
265 parameters:
266 - bool:
267 <<: *images_parameters_SKIP_BASE_IMAGES
268 - bool:
269 <<: *images_parameters_SKIP_PROFILE_IMAGES
270 - choice:
271 <<: *images_parameters_ARCH_FILTER
272 choices:
273 - all
274 - amd64
275 - choice:
276 <<: *images_parameters_IMAGE_TYPE_FILTER
277 - choice:
278 <<: *images_parameters_PROFILE_FILTER
279 - choice:
280 name: 'RELEASE_FILTER'
281 choices:
282 - 'all'
283 - '8'
284 - '9'
285 - string:
286 <<: *images_parameters_GIT_URL
287 - string:
288 <<: *images_parameters_GIT_BRANCH
289 jobs:
290 - 'images_imagebuilder_{OS}'
291
292 - project:
293 name: images_imagebuilder_SLES
294 OS:
295 - sles
296 ARCHES:
297 - amd64
298 RELEASES:
299 # 12.5 Doesn't currently work well with Incus either as a container or a VM
300 # * 12.5 has systemd 228, which doesn't support cgroups v2. Hosts _could_
301 # be configured to disable the unified cgroup hierarchy in order to have
302 # this version systemd work correctly.
303 # * Running as a QEMU VM, virtio_scsi isn't correctly able to bring the
304 # virtual disks online. The version of incus currently deployed doesn't
305 # support the io.bus option to use virtio-blk instead.
306 # - '12.5'
307 - '15.4'
308 - '15.5'
309 parameters:
310 - bool:
311 <<: *images_parameters_SKIP_BASE_IMAGES
312 default: true
313 - bool:
314 <<: *images_parameters_SKIP_PROFILE_IMAGES
315 - choice:
316 <<: *images_parameters_ARCH_FILTER
317 choices:
318 - all
319 - amd64
320 - choice:
321 <<: *images_parameters_IMAGE_TYPE_FILTER
322 - choice:
323 <<: *images_parameters_PROFILE_FILTER
324 - choice:
325 name: 'RELEASE_FILTER'
326 choices:
327 - 'all'
328 - '15.4'
329 - '15.5'
330 - string:
331 <<: *images_parameters_GIT_URL
332 - string:
333 <<: *images_parameters_GIT_BRANCH
334 jobs:
335 - 'images_imagebuilder_{OS}'
336
337 - project:
338 name: images_imagebuilder_ubuntu
339 OS:
340 - ubuntu
341 ARCHES:
342 - amd64
343 RELEASES:
344 - focal
345 - jammy
346 - noble
347 parameters:
348 - bool:
349 <<: *images_parameters_SKIP_BASE_IMAGES
350 - bool:
351 <<: *images_parameters_SKIP_PROFILE_IMAGES
352 - choice:
353 <<: *images_parameters_ARCH_FILTER
354 choices:
355 - all
356 - amd64
357 - choice:
358 <<: *images_parameters_IMAGE_TYPE_FILTER
359 - choice:
360 <<: *images_parameters_PROFILE_FILTER
361 - choice:
362 name: 'RELEASE_FILTER'
363 choices:
364 - 'all'
365 - 'focal'
366 - 'jammy'
367 - 'noble'
368 - string:
369 <<: *images_parameters_GIT_URL
370 - string:
371 <<: *images_parameters_GIT_BRANCH
372 jobs:
373 - 'images_imagebuilder_{OS}'
374
375 - project:
376 name: images_basejobs
377 jobs:
378 - 'images_imagebuilder'
379 - 'images_distrobuilder'
380 - project:
381 name: images_imagebuilder_views
382 views:
383 - Images
This page took 0.037172 seconds and 5 git commands to generate.