jjb: Add job to build sles15sp5 images
[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 - '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
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
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 - 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}'
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
255 - project:
256 name: images_imagebuilder_SLES
257 OS:
258 - sles
259 ARCHES:
260 - amd64
261 RELEASES:
262 # 12.5 Doesn't currently work well with LXD either as a container or a VM
263 # * 12.5 has systemd 228, which doesn't support cgroups v2. Hosts _could_
264 # be configured to disable the unified cgroup hierarchy in order to have
265 # this version systemd work correctly.
266 # * Running as a QEMU VM, virtio_scsi isn't correctly able to bring the
267 # virtual disks online. The version of lxd currently deployed doesn't
268 # support the io.bus option to use virtio-blk instead.
269 # - '12.5'
270 - '15.4'
271 - '15.5'
272 parameters:
273 - bool:
274 <<: *images_parameters_SKIP_BASE_IMAGES
275 default: true
276 - bool:
277 <<: *images_parameters_SKIP_PROFILE_IMAGES
278 - choice:
279 <<: *images_parameters_ARCH_FILTER
280 choices:
281 - all
282 - amd64
283 - choice:
284 <<: *images_parameters_IMAGE_TYPE_FILTER
285 - choice:
286 <<: *images_parameters_PROFILE_FILTER
287 - choice:
288 name: 'RELEASE_FILTER'
289 choices:
290 - 'all'
291 - '15.4'
292 - '15.5'
293 - string:
294 <<: *images_parameters_GIT_URL
295 - string:
296 <<: *images_parameters_GIT_BRANCH
297 jobs:
298 - 'images_imagebuilder_{OS}'
299
300 - project:
301 name: images_imagebuilder_ubuntu
302 OS:
303 - ubuntu
304 ARCHES:
305 - amd64
306 RELEASES:
307 - focal
308 - jammy
309 - noble
310 parameters:
311 - bool:
312 <<: *images_parameters_SKIP_BASE_IMAGES
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 - 'focal'
329 - 'jammy'
330 - 'noble'
331 - string:
332 <<: *images_parameters_GIT_URL
333 - string:
334 <<: *images_parameters_GIT_BRANCH
335 jobs:
336 - 'images_imagebuilder_{OS}'
337
338 - project:
339 name: images_basejobs
340 jobs:
341 - 'images_imagebuilder'
342 - 'images_distrobuilder'
343 - project:
344 name: images_imagebuilder_views
345 views:
346 - Images
This page took 0.039536 seconds and 4 git commands to generate.