-
Notifications
You must be signed in to change notification settings - Fork 96
/
.gitlab-ci.yml
519 lines (468 loc) · 19.5 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
variables:
DOCKER_REPOSITORY: mendersoftware/mender-convert
MULTIPLATFORM_BUILD: "true"
MULTIPLATFORM_PLATFORMS: "linux/amd64,linux/arm64"
S3_BUCKET_NAME: mender-convert-images
# These variables are present elsewhere in the repository too. Make sure to
# search for and change them too.
MENDER_ARTIFACT_VERSION:
value: "3.11.2"
description: |-
Version of mender-artifact for the builder image - a specific version
MENDER_CLIENT_VERSION:
value: "latest"
description: |-
Version of mender for the converted image - 'latest', 'auto', 'master' or a specific version
MENDER_FLASH_VERSION:
value: "latest"
description: |-
Version of mender-flash for the converted image - 'latest', 'master' or a specific version
MENDER_ADDON_CONNECT_VERSION:
value: "latest"
description: |-
Version of mender-connect for the converted image - 'latest', 'master' or a specific version
MENDER_ADDON_CONFIGURE_VERSION:
value: "latest"
description: |-
Version of mender-configure for the converted image - 'latest', 'master' or a specific version
# Which version of mender-convert to use in published image name. Normally
# empty, in which case the branch or tag name will be used, but this variable
# is available so that it's possible to make small build fixes on an already
# tagged version.
MENDER_CONVERT_PUBLISH_VERSION: ""
TEST_MENDER_CONVERT:
value: "true"
options:
- "true"
- "false"
description: |-
Whether to run acceptance tests
PUBLISH_MENDER_CONVERT_AUTOMATIC:
value: "false"
options:
- "true"
- "false"
description: |-
Whether to publish packages automatically - they can always be published manually
TESTS_IN_PARALLEL_CLIENT_ACCEPTANCE: "4"
DEBIAN_FRONTEND: noninteractive
# Docker dind configuration.
# To use dind, make sure gitlab-runner's configuration
# has a common mount for /certs (i.e. runners.docker.volumes) directory
# and that the dind service name is always docker (default hostname).
DOCKER_HOST: "tcp://docker:2376"
DOCKER_CERT_PATH: "/certs/client"
DOCKER_TLS_VERIFY: "1"
DOCKER_TLS_CERTDIR: "/certs"
# Ubuntu distribution to use in test_acceptance jobs
# Jammy Jellyfish is Ubuntu 22.04
ACC_TESTS_UBUNTU_DISTRO: "jammy"
include:
- project: 'Northern.tech/Mender/mendertesting'
file:
- '.gitlab-ci-check-commits.yml'
- '.gitlab-ci-check-license.yml'
- '.gitlab-ci-github-status-updates.yml'
- '.gitlab-ci-check-shell-format.yml'
- '.gitlab-ci-check-docker-build.yml'
stages:
- test
- build
- convert
- flash
- test_acceptance
- publish
test:check-commits:
only:
variables:
- '$TEST_MENDER_CONVERT == "true"'
test:check-license:
rules:
- if: '$TEST_MENDER_CONVERT == "true"'
test:check-shell-formatting:
rules:
- if: '$TEST_MENDER_CONVERT == "true"'
before_script:
- SHELL_SCRIPTS=$(find mender-convert* modules configs scripts
-type f
-not -name "*.md"
-not -path "scripts/linkbot/*"
-not -wholename "scripts/test/*")
build:docker-multiplatform:
variables:
DOCKER_BUILDKIT: 1
GITLAB_REGISTRY_TAG: '${CI_REGISTRY_IMAGE}:${CI_PIPELINE_ID}'
EXTRA_DOCKER_ARGS: "--build-arg MENDER_ARTIFACT_VERSION=${MENDER_ARTIFACT_VERSION}"
.template_convert_raspbian: &convert_raspbian
stage: convert
needs:
- job: build:docker-multiplatform
artifacts: false
image: ubuntu:22.04
services:
- docker:dind
tags:
- mender-qa-worker-generic
before_script:
- apt update && apt install -yy bash wget xz-utils awscli docker.io curl
- docker pull ${CI_REGISTRY_IMAGE}:${CI_PIPELINE_ID}
- export IMAGE_NAME=${CI_REGISTRY_IMAGE}:${CI_PIPELINE_ID}
- export RASPBERRYPI_CONFIG_NAME="$(basename "$RASPBERRYPI_PLATFORM")"
- mkdir -p input
- cd input
- wget -q ${RASPBIAN_DOWNLOAD_CONVERT}
- unxz ${RASPBIAN_NAME_CONVERT}.img.xz
- cd ..
- eval "$(curl https://raw.githubusercontent.com/mendersoftware/mendertesting/master/mender-ci-common.sh)"
script:
- env MENDER_ARTIFACT_NAME=${RASPBIAN_NAME_CONVERT}-mender
./docker-mender-convert --disk-image input/${RASPBIAN_NAME_CONVERT}.img
--config configs/raspberrypi/${RASPBERRYPI_PLATFORM}_config
--config configs/images/raspberrypi_raspbian_config
# Collect artifacts.
- mv deploy ${RASPBERRYPI_CONFIG_NAME}
- tar czf ${RASPBERRYPI_CONFIG_NAME}.tar.gz ${RASPBERRYPI_CONFIG_NAME}
# Upload to temporary S3 bucket
- mender_ci_save_tmp_artifact ${RASPBERRYPI_CONFIG_NAME}.tar.gz
artifacts:
paths:
- checksums
convert_raspbian_raspberrypi4_bookworm_64bit:
<<: *convert_raspbian
variables:
RASPBERRYPI_PLATFORM: uboot/debian/raspberrypi4_bookworm_64bit
RASPBIAN_NAME_CONVERT: 2024-10-22-raspios-bookworm-arm64-lite
## Important: when updating the upstream image update also RASPBERRY_PI_OS_PREFIX in the publish jobs
RASPBIAN_DOWNLOAD_CONVERT: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-10-28/2024-10-22-raspios-bookworm-arm64-lite.img.xz
convert_raspbian_raspberrypi4_bookworm_32bit:
<<: *convert_raspbian
variables:
RASPBERRYPI_PLATFORM: uboot/debian/raspberrypi4_bookworm_32bit
RASPBIAN_NAME_CONVERT: 2024-10-22-raspios-bookworm-armhf-lite
## Important: when updating the upstream image update also RASPBERRY_PI_OS_PREFIX in the publish jobs
RASPBIAN_DOWNLOAD_CONVERT: https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-10-28/2024-10-22-raspios-bookworm-armhf-lite.img.xz
convert_raspbian_raspberrypi4_bullseye_64bit:
<<: *convert_raspbian
variables:
RASPBERRYPI_PLATFORM: uboot/debian/raspberrypi4_bullseye_64bit
RASPBIAN_NAME_CONVERT: 2024-07-04-raspios-bullseye-arm64-lite
## Important: when updating the upstream image update also RASPBERRY_PI_OS_PREFIX in the publish jobs
RASPBIAN_DOWNLOAD_CONVERT: https://downloads.raspberrypi.com/raspios_oldstable_lite_arm64/images/raspios_oldstable_lite_arm64-2024-07-04/2024-07-04-raspios-bullseye-arm64-lite.img.xz
convert_raspbian_raspberrypi4_bullseye_32bit:
<<: *convert_raspbian
variables:
RASPBERRYPI_PLATFORM: uboot/debian/raspberrypi4_bullseye_32bit
RASPBIAN_NAME_CONVERT: 2024-07-04-raspios-bullseye-armhf-lite
## Important: when updating the upstream image update also RASPBERRY_PI_OS_PREFIX in the publish jobs
RASPBIAN_DOWNLOAD_CONVERT: https://downloads.raspberrypi.com/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2024-07-04/2024-07-04-raspios-bullseye-armhf-lite.img.xz
.bash_helpers: &bash_helpers |
# Bash function to check if the string is a final tag
function is_final_tag () {
version="$1"
[[ "${version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && return 0 || return $?
}
# Bash function to check if the string is a build tag
function is_build_tag () {
version="$1"
[[ "${version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+-build[0-9]+$ ]] && return 0 || return $?
}
.template_test_acceptance: &test_acceptance
stage: test_acceptance
needs:
- job: build:docker-multiplatform
artifacts: false
image: ubuntu:${ACC_TESTS_UBUNTU_DISTRO}
services:
- docker:dind
tags:
- mender-qa-worker-mender-convert-tests
timeout: 2h
before_script:
- *bash_helpers
# Install dependencies
- apt update
- apt install -qyy bash wget git util-linux mtools python3 python3-pip
gcc python3-dev libffi-dev liblzo2-dev libc-dev libssl-dev make sudo
awscli unzip qemu-system-x86 ovmf curl docker.io s3cmd fdisk gnupg-agent
# Python3 dependencies
- python3 -m pip install -U pip
- pip3 install --ignore-installed -r tests/requirements_py3.txt
# Load image under test
- docker pull ${CI_REGISTRY_IMAGE}:${CI_PIPELINE_ID}
- export IMAGE_NAME=${CI_REGISTRY_IMAGE}:${CI_PIPELINE_ID}
- export RASPBERRYPI_CONFIG_NAME="$(basename "$RASPBERRYPI_PLATFORM")"
# Set mender-image-tests submodule to correct version
- git submodule update --init --recursive
# Get mender-artifact for the tests
- if is_final_tag "${MENDER_ARTIFACT_VERSION}" || is_build_tag "${MENDER_ARTIFACT_VERSION}"; then
# Direct download from the pool
- wget "https://downloads.mender.io/repos/debian/pool/main/m/mender-artifact/mender-artifact_${MENDER_ARTIFACT_VERSION}-1%2Bubuntu%2B${ACC_TESTS_UBUNTU_DISTRO}_amd64.deb"
- dpkg --install mender-artifact_${MENDER_ARTIFACT_VERSION}-1+ubuntu+${ACC_TESTS_UBUNTU_DISTRO}_amd64.deb
- rm mender-artifact_${MENDER_ARTIFACT_VERSION}-1+ubuntu+${ACC_TESTS_UBUNTU_DISTRO}_amd64.deb
- else
# Assume master and install from experimental repo
- curl -fLsS https://downloads.mender.io/repos/debian/gpg | apt-key add -
- echo "deb [arch=$(dpkg --print-architecture)] https://downloads.mender.io/repos/debian ubuntu/${ACC_TESTS_UBUNTU_DISTRO}/experimental main" >
/etc/apt/sources.list.d/mender.list
- apt-get update && apt-get install mender-artifact
- fi
# Prepare versions file for mender-convert
- echo "MENDER_CLIENT_VERSION=${MENDER_CLIENT_VERSION}" > versions_override_config
- echo "MENDER_FLASH_VERSION=${MENDER_FLASH_VERSION}" >> versions_override_config
- echo "MENDER_ADDON_CONNECT_VERSION=${MENDER_ADDON_CONNECT_VERSION}" >> versions_override_config
- echo "MENDER_ADDON_CONFIGURE_VERSION=${MENDER_ADDON_CONFIGURE_VERSION}" >> versions_override_config
# Get Update Modules Artifact generators for the tests
- if [ "${MENDER_CLIENT_VERSION}" = "latest" ]; then
- mender_version=master
- else
- mender_version="${MENDER_CLIENT_VERSION}"
- fi
- curl -f -O https://raw.githubusercontent.com/mendersoftware/mender/${mender_version}/support/modules-artifact-gen/directory-artifact-gen
- chmod ugo+x directory-artifact-gen
- mv directory-artifact-gen /usr/bin/
- curl -f -O https://raw.githubusercontent.com/mendersoftware/mender/${mender_version}/support/modules-artifact-gen/single-file-artifact-gen
- chmod ugo+x single-file-artifact-gen
- mv single-file-artifact-gen /usr/bin/
artifacts:
expire_in: 2w
when: always
paths:
- results_*.xml
- report_*.html
reports:
junit: results_*.xml
rules:
- if: '$TEST_MENDER_CONVERT == "true"'
.template_test_acceptance_prebuilt_raspberrypi: &test_acceptance_prebuilt_raspberrypi
<<: *test_acceptance
script:
- eval "$(curl https://raw.githubusercontent.com/mendersoftware/mendertesting/master/mender-ci-common.sh)"
# Fetch artifacts from temporary S3 bucket
- mender_ci_load_tmp_artifact ${RASPBERRYPI_CONFIG_NAME}.tar.gz
- tar xzf ${RASPBERRYPI_CONFIG_NAME}.tar.gz
- mv ${RASPBERRYPI_CONFIG_NAME} deploy
# Extract converted Raspbian artifacts
- unxz deploy/${RASPBIAN_NAME_ACCEPTANCE}-${MENDER_DEVICE_TYPE}-mender.img.xz
- ./scripts/test/run-tests.sh
--prebuilt-image ${MENDER_DEVICE_TYPE}
${RASPBIAN_NAME_ACCEPTANCE}-${MENDER_DEVICE_TYPE}-mender
--
-n $TESTS_IN_PARALLEL_CLIENT_ACCEPTANCE
test_acceptance_prebuilt_raspberrypi4_bookworm_64bit:
<<: *test_acceptance_prebuilt_raspberrypi
needs:
- job: build:docker-multiplatform
artifacts: false
- job: convert_raspbian_raspberrypi4_bookworm_64bit
artifacts: true
variables:
RASPBERRYPI_PLATFORM: uboot/debian/raspberrypi4_bookworm_64bit
RASPBIAN_NAME_ACCEPTANCE: 2024-10-22-raspios-bookworm-arm64-lite
MENDER_DEVICE_TYPE: raspberrypi4_64
test_acceptance_prebuilt_raspberrypi4_bookworm_32bit:
<<: *test_acceptance_prebuilt_raspberrypi
needs:
- job: build:docker-multiplatform
artifacts: false
- job: convert_raspbian_raspberrypi4_bookworm_32bit
artifacts: true
variables:
RASPBERRYPI_PLATFORM: uboot/debian/raspberrypi4_bookworm_32bit
RASPBIAN_NAME_ACCEPTANCE: 2024-10-22-raspios-bookworm-armhf-lite
MENDER_DEVICE_TYPE: raspberrypi4
test_acceptance_prebuilt_raspberrypi4_bullseye_64bit:
<<: *test_acceptance_prebuilt_raspberrypi
needs:
- job: build:docker-multiplatform
artifacts: false
- job: convert_raspbian_raspberrypi4_bullseye_64bit
artifacts: true
variables:
RASPBERRYPI_PLATFORM: uboot/debian/raspberrypi4_bullseye_64bit
RASPBIAN_NAME_ACCEPTANCE: 2024-07-04-raspios-bullseye-arm64-lite
MENDER_DEVICE_TYPE: raspberrypi4_64
test_acceptance_prebuilt_raspberrypi4_bullseye_32bit:
<<: *test_acceptance_prebuilt_raspberrypi
needs:
- job: build:docker-multiplatform
artifacts: false
- job: convert_raspbian_raspberrypi4_bullseye_32bit
artifacts: true
variables:
RASPBERRYPI_PLATFORM: uboot/debian/raspberrypi4_bullseye_32bit
RASPBIAN_NAME_ACCEPTANCE: 2024-07-04-raspios-bullseye-armhf-lite
MENDER_DEVICE_TYPE: raspberrypi4
test_acceptance_ubuntu_qemux86_64:
<<: *test_acceptance
script:
- mkdir -p input/config
- cp versions_override_config input/config/versions_override_config
- ./scripts/test/run-tests.sh
--config input/config/versions_override_config
--only ubuntu-qemux86-64
--
-n $TESTS_IN_PARALLEL_CLIENT_ACCEPTANCE
test_acceptance_ubuntu_qemux86_64_no_grub_d:
<<: *test_acceptance
script:
- mkdir -p input/config
- cp versions_override_config input/config/versions_override_config
- ./scripts/test/run-tests.sh
--config input/config/versions_override_config
--only ubuntu-qemux86-64-no-grub-d
--
-n $TESTS_IN_PARALLEL_CLIENT_ACCEPTANCE
test_acceptance_debian_qemux86_64:
<<: *test_acceptance
script:
- mkdir -p input/config
- cp versions_override_config input/config/versions_override_config
- ./scripts/test/run-tests.sh
--config input/config/versions_override_config
--only debian-qemux86-64
--
-n $TESTS_IN_PARALLEL_CLIENT_ACCEPTANCE
test_acceptance_raspberrypi4_bookworm_64bit:
<<: *test_acceptance
script:
- mkdir -p input/config
- cp versions_override_config input/config/versions_override_config
- ./scripts/test/run-tests.sh
--config input/config/versions_override_config
--only raspberrypi4_bookworm_64bit
--
-n $TESTS_IN_PARALLEL_CLIENT_ACCEPTANCE
.template:publish:s3:
stage: publish
needs:
- job: convert_raspbian_raspberrypi4_bookworm_64bit
artifacts: true
- job: convert_raspbian_raspberrypi4_bookworm_32bit
artifacts: true
- job: convert_raspbian_raspberrypi4_bullseye_64bit
artifacts: true
- job: convert_raspbian_raspberrypi4_bullseye_32bit
artifacts: true
image: debian:buster
before_script:
- apt update && apt install -yyq awscli curl
- eval "$(curl https://raw.githubusercontent.com/mendersoftware/mendertesting/master/mender-ci-common.sh)"
- IMAGE_VERSION=${MENDER_CONVERT_PUBLISH_VERSION:-${CI_COMMIT_REF_NAME}}
script:
# One by one, fetch artifacts from temporary S3 bucket and publish to production S3 bucket
- for RASPBERRYPI_CONFIG_NAME in raspberrypi4_bookworm_64bit raspberrypi4_bookworm_32bit raspberrypi4_bullseye_64bit raspberrypi4_bullseye_32bit; do
- mender_ci_load_tmp_artifact ${RASPBERRYPI_CONFIG_NAME}.tar.gz
- tar xzf ${RASPBERRYPI_CONFIG_NAME}.tar.gz
- PUBLISH_NAME=${RASPBERRY_PI_OS_PREFIX}-${RASPBERRYPI_CONFIG_NAME}-mender-convert-${IMAGE_VERSION}.img.xz
- echo "Publishing ${PUBLISH_NAME} version to S3"
# It is not possible deduce filename from RASPBERRY_PI_OS_PREFIX and RASPBERRYPI_CONFIG_NAME,
# so use a wildcard and assume that there is only one conversion per directory (same below)
- aws s3 cp ${RASPBERRYPI_CONFIG_NAME}/*-mender.img.xz
s3://$S3_BUCKET_NAME/${RASPBERRY_PI_OS_PREFIX}/arm/${PUBLISH_NAME}
- aws s3api put-object-acl --acl public-read --bucket $S3_BUCKET_NAME
--key ${RASPBERRY_PI_OS_PREFIX}/arm/${PUBLISH_NAME}
- PUBLISH_NAME=${RASPBERRY_PI_OS_PREFIX}-${RASPBERRYPI_CONFIG_NAME}-mender-convert-${IMAGE_VERSION}.mender
- echo "Publishing ${PUBLISH_NAME} version to S3"
- aws s3 cp ${RASPBERRYPI_CONFIG_NAME}/*-mender.mender
s3://$S3_BUCKET_NAME/${RASPBERRY_PI_OS_PREFIX}/arm/${PUBLISH_NAME}
- aws s3api put-object-acl --acl public-read --bucket $S3_BUCKET_NAME
--key ${RASPBERRY_PI_OS_PREFIX}/arm/${PUBLISH_NAME}
# Remove after upload to free disk space for the next board
- rm -rf ${RASPBERRYPI_CONFIG_NAME}.tar.gz ${RASPBERRYPI_CONFIG_NAME}/
- done
publish:s3:manual:
when: manual
extends: .template:publish:s3
variables:
RASPBERRY_PI_OS_PREFIX: 2024-10-22-raspios-lite
publish:s3:automatic:
rules:
- if: '$PUBLISH_MENDER_CONVERT_AUTOMATIC == "true"'
extends: .template:publish:s3
variables:
RASPBERRY_PI_OS_PREFIX: 2024-10-22-raspios-lite
# excludes non multiplatform build job
build:docker:
rules:
- when: never
# excludes non multiplatform build job
publish:image:
rules:
- when: never
# excludes non multiplatform build job
publish:image:mender:
rules:
- when: never
# excludes non multiplatform build job
publish:image:saas:
rules:
- when: never
####################
# Hardware testing #
####################
test:hardware:convert:
<<: *convert_raspbian
variables:
RASPBERRYPI_PLATFORM: uboot/debian/raspberrypi4_bookworm_64bit
when: manual
stage: convert
script:
# Convert the image for the hardware tester
- env MENDER_ARTIFACT_NAME=${RASPBIAN_NAME}-mender
./docker-mender-convert --disk-image input/${RASPBIAN_NAME}.img
--config configs/raspberrypi/${RASPBERRYPI_PLATFORM}_config
--config configs/images/raspberrypi_raspbian_config
--config configs/testing/hardware-testing
--overlay tests/ssh-public-key-overlay
# Collect artifacts.
- mv deploy ${RASPBERRYPI_CONFIG_NAME}-hardware-test
- tar czf ${RASPBERRYPI_CONFIG_NAME}-hardware-test.tar.gz ${RASPBERRYPI_CONFIG_NAME}-hardware-test
# Upload to temporary S3 bucket
- mender_ci_save_tmp_artifact ${RASPBERRYPI_CONFIG_NAME}-hardware-test.tar.gz
artifacts:
paths:
- checksums
test:hardware:flash:
needs:
- job: test:hardware:convert
artifacts: true
variables:
RASPBERRYPI_PLATFORM: uboot/debian/raspberrypi4_bookworm_64bit
tags:
- hw
stage: flash
script:
- eval "$(curl https://raw.githubusercontent.com/mendersoftware/mendertesting/master/mender-ci-common.sh)"
# Fetch artifacts from temporary S3 bucket
- mender_ci_load_tmp_artifact ${RASPBERRYPI_CONFIG_NAME}-hardware-test.tar.gz
# Flash and boot the device under test
- slave-control mode flash
- tar -xvzf ${RASPBERRYPI_CONFIG_NAME}-hardware-test.tar.gz --wildcards --no-anchored '*.img' --to-stdout | dd of=/dev/sdmux bs=8M
- slave-control mode test
test:hardware:acceptance:
<<: *test_acceptance
variables:
RASPBERRYPI_PLATFORM: uboot/debian/raspberrypi4_bookworm_64bit
stage: test_acceptance
needs:
- job: build:docker-multiplatform
artifacts: false
- job: test:hardware:convert
artifacts: true
- job: test:hardware:flash
script:
# Fetch artifacts from temporary S3 bucket
- eval "$(curl https://raw.githubusercontent.com/mendersoftware/mendertesting/master/mender-ci-common.sh)"
- mender_ci_load_tmp_artifact ${RASPBERRYPI_CONFIG_NAME}-hardware-test.tar.gz
# Extract the configuration
- tar xzf ${RASPBERRYPI_CONFIG_NAME}-hardware-test.tar.gz
- mv ${RASPBERRYPI_CONFIG_NAME}-hardware-test deploy
# Run the tests
- ./scripts/test/run-tests.sh
--prebuilt-image raspberrypi4_64
${RASPBIAN_NAME}-${RASPBERRYPI_CONFIG_NAME}-mender
--
--hardware-testing
--host ${SSH_JUMP_HOST_IP}:${SSH_JUMP_HOST_PORT}
-k "'not test_network_based_image_update and not test_image_update_broken_kernel'"
-n 1