Commit | Line | Data |
---|---|---|
d329b32d KS |
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 | - 'lxd' | |
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_LXD_HOST | |
46 | name: 'LXD_HOST' | |
47 | default: 'ci-host-amd64-1a.internal.efficios.com' | |
48 | description: 'The address of the LXD cluster to publish to' | |
49 | required: true | |
50 | - string: &images_parameters_LXD_INSTANCE_PROFILE | |
51 | name: 'LXD_INSTANCE_PROFILE' | |
52 | default: 'ci-rootnode' | |
53 | description: 'The LXD 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_LXD_HOST | |
85 | - string: | |
86 | <<: *images_parameters_LXD_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: 'LXC_CI_GIT_URL' | |
101 | default: 'https://github.com/lxc/lxc-ci.git' | |
102 | - string: | |
103 | name: 'LXC_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 | ||
d329b32d KS |
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: LXD_CLIENT_CERT | |
141 | - file: | |
142 | credential-id: '0debf23b-191b-4cdf-8a25-04e9a7092a67' | |
143 | variable: LXD_CLIENT_KEY | |
a2e5135c KS |
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 | |
d329b32d KS |
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 | |
a2e5135c | 162 | parameters: '{obj:parameters}' |
d329b32d KS |
163 | IMAGE_TYPES: |
164 | - lxd | |
165 | - vm | |
166 | PROFILES: | |
167 | - ci-node | |
168 | - developer | |
169 | dsl: !include-jinja2: pipelines/images/default.groovy | |
170 | ||
171 | - job-template: | |
172 | name: images_distrobuilder | |
173 | defaults: imagebuilder | |
174 | node: 'deb12-amd64-rootnode' | |
175 | <<: *images_parameters_distrobuilder_defaults | |
176 | <<: *images_properties_defaults | |
177 | builders: | |
178 | - shell: !include-raw-escape: pipelines/images/distrobuild.sh | |
179 | ||
180 | - job-template: | |
181 | name: images_imagebuilder | |
182 | defaults: imagebuilder | |
183 | node: 'deb12-amd64-rootnode' | |
184 | <<: *images_parameters_imagebuilder_defaults | |
185 | <<: *images_properties_defaults | |
186 | builders: | |
187 | - shell: !include-raw-escape: pipelines/images/imagebuild.sh | |
188 | ||
189 | ||
190 | ## Views | |
191 | - view-template: | |
192 | name: 'Images' | |
193 | view-type: list | |
194 | regex: 'image.*' | |
195 | ||
196 | ## Projects | |
197 | ||
198 | - project: | |
199 | name: images_imagebuilder_OS | |
200 | OS: | |
201 | - debian | |
202 | ARCHES: | |
203 | - i386 | |
204 | - amd64 | |
205 | RELEASES: | |
206 | - bullseye | |
207 | - bookworm | |
208 | - trixie | |
209 | - sid | |
210 | jobs: | |
211 | - 'images_imagebuilder_{OS}' | |
a2e5135c KS |
212 | parameters: |
213 | - bool: &images_parameters_SKIP_BASE_IMAGES | |
214 | name: 'SKIP_BASE_IMAGES' | |
215 | default: false | |
216 | - bool: &images_parameters_SKIP_PROFILE_IMAGES | |
217 | name: 'SKIP_PROFILE_IMAGES' | |
218 | default: false | |
219 | - choice: &images_parameters_ARCH_FILTER | |
220 | name: 'ARCH_FILTER' | |
221 | choices: | |
222 | - all | |
223 | - amd64 | |
224 | - i386 | |
225 | - arm64 | |
226 | - armhf | |
227 | - ppc64el | |
228 | - riscv64 | |
229 | - s390x | |
230 | - choice: &images_parameters_IMAGE_TYPE_FILTER | |
231 | name: 'IMAGE_TYPE_FILTER' | |
232 | choices: | |
233 | - all | |
234 | - lxd | |
235 | - vm | |
236 | - choice: &images_parameters_PROFILE_FILTER | |
237 | name: 'PROFILE_FILTER' | |
238 | choices: | |
239 | - all | |
240 | - ci-node | |
241 | - developer | |
242 | - choice: | |
243 | name: 'RELEASE_FILTER' | |
244 | choices: | |
245 | - all | |
246 | - bullseye | |
247 | - bookworm | |
248 | - trixie | |
249 | - sid | |
250 | - string: | |
251 | <<: *images_parameters_GIT_URL | |
252 | - string: | |
253 | <<: *images_parameters_GIT_BRANCH | |
254 | ||
8724a2db KS |
255 | - project: |
256 | name: images_imagebuilder_rockylinux | |
257 | OS: | |
258 | - rockylinux | |
259 | ARCHES: | |
260 | - amd64 | |
261 | RELEASES: | |
262 | - '8' | |
263 | - '9' | |
264 | parameters: | |
265 | - bool: | |
266 | <<: *images_parameters_SKIP_BASE_IMAGES | |
267 | - bool: | |
268 | <<: *images_parameters_SKIP_PROFILE_IMAGES | |
269 | - choice: | |
270 | <<: *images_parameters_ARCH_FILTER | |
271 | choices: | |
272 | - all | |
273 | - amd64 | |
274 | - choice: | |
275 | <<: *images_parameters_IMAGE_TYPE_FILTER | |
276 | - choice: | |
277 | <<: *images_parameters_PROFILE_FILTER | |
278 | - choice: | |
279 | name: 'RELEASE_FILTER' | |
280 | choices: | |
281 | - 'all' | |
282 | - '8' | |
283 | - '9' | |
284 | - string: | |
285 | <<: *images_parameters_GIT_URL | |
286 | - string: | |
287 | <<: *images_parameters_GIT_BRANCH | |
288 | jobs: | |
289 | - 'images_imagebuilder_{OS}' | |
290 | ||
a2e5135c KS |
291 | - project: |
292 | name: images_imagebuilder_SLES | |
293 | OS: | |
294 | - sles | |
295 | ARCHES: | |
296 | - amd64 | |
297 | RELEASES: | |
298 | # 12.5 Doesn't currently work well with LXD either as a container or a VM | |
299 | # * 12.5 has systemd 228, which doesn't support cgroups v2. Hosts _could_ | |
300 | # be configured to disable the unified cgroup hierarchy in order to have | |
301 | # this version systemd work correctly. | |
302 | # * Running as a QEMU VM, virtio_scsi isn't correctly able to bring the | |
303 | # virtual disks online. The version of lxd currently deployed doesn't | |
304 | # support the io.bus option to use virtio-blk instead. | |
305 | # - '12.5' | |
306 | - '15.4' | |
83ab909e | 307 | - '15.5' |
a2e5135c KS |
308 | parameters: |
309 | - bool: | |
310 | <<: *images_parameters_SKIP_BASE_IMAGES | |
311 | default: true | |
312 | - bool: | |
313 | <<: *images_parameters_SKIP_PROFILE_IMAGES | |
314 | - choice: | |
315 | <<: *images_parameters_ARCH_FILTER | |
316 | choices: | |
317 | - all | |
318 | - amd64 | |
319 | - choice: | |
320 | <<: *images_parameters_IMAGE_TYPE_FILTER | |
321 | - choice: | |
322 | <<: *images_parameters_PROFILE_FILTER | |
323 | - choice: | |
324 | name: 'RELEASE_FILTER' | |
325 | choices: | |
326 | - 'all' | |
327 | - '15.4' | |
83ab909e | 328 | - '15.5' |
a2e5135c KS |
329 | - string: |
330 | <<: *images_parameters_GIT_URL | |
331 | - string: | |
332 | <<: *images_parameters_GIT_BRANCH | |
333 | jobs: | |
334 | - 'images_imagebuilder_{OS}' | |
d95cc37f KS |
335 | |
336 | - project: | |
337 | name: images_imagebuilder_ubuntu | |
338 | OS: | |
339 | - ubuntu | |
340 | ARCHES: | |
341 | - amd64 | |
342 | RELEASES: | |
343 | - focal | |
344 | - jammy | |
345 | - noble | |
346 | parameters: | |
347 | - bool: | |
348 | <<: *images_parameters_SKIP_BASE_IMAGES | |
349 | - bool: | |
350 | <<: *images_parameters_SKIP_PROFILE_IMAGES | |
351 | - choice: | |
352 | <<: *images_parameters_ARCH_FILTER | |
353 | choices: | |
354 | - all | |
355 | - amd64 | |
356 | - choice: | |
357 | <<: *images_parameters_IMAGE_TYPE_FILTER | |
358 | - choice: | |
359 | <<: *images_parameters_PROFILE_FILTER | |
360 | - choice: | |
361 | name: 'RELEASE_FILTER' | |
362 | choices: | |
363 | - 'all' | |
364 | - 'focal' | |
365 | - 'jammy' | |
366 | - 'noble' | |
367 | - string: | |
368 | <<: *images_parameters_GIT_URL | |
369 | - string: | |
370 | <<: *images_parameters_GIT_BRANCH | |
371 | jobs: | |
372 | - 'images_imagebuilder_{OS}' | |
373 | ||
d329b32d KS |
374 | - project: |
375 | name: images_basejobs | |
376 | jobs: | |
377 | - 'images_imagebuilder' | |
378 | - 'images_distrobuilder' | |
379 | - project: | |
380 | name: images_imagebuilder_views | |
381 | views: | |
382 | - Images |