Skip to content

Commit 66637cd

Browse files
committed
test: Add more distros for composefs test
And ignore test-integration-cfs failure on centos-9 Signed-off-by: Xiaofeng Wang <[email protected]>
1 parent c797b37 commit 66637cd

File tree

4 files changed

+43
-17
lines changed

4 files changed

+43
-17
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136

137137
- name: Setup env
138138
run: |
139-
BASE=$(just pullspec-for-os ${{ matrix.test_os }})
139+
BASE=$(just pullspec-for-os base ${{ matrix.test_os }})
140140
echo "BOOTC_base=${BASE}" >> $GITHUB_ENV
141141
142142
- name: Build container
@@ -175,13 +175,19 @@ jobs:
175175
176176
# This variant does composefs testing
177177
test-integration-cfs:
178+
continue-on-error: ${{ matrix.experimental }}
178179
strategy:
179180
fail-fast: false
180181
matrix:
181-
# TODO expand this matrix, we need to make it better to override the target
182182
# OS via Justfile variables too
183-
test_os: [centos-10]
183+
test_os: [fedora-42, fedora-43, fedora-44, centos-10]
184184
variant: [composefs-sealeduki-sdboot]
185+
experimental: [false]
186+
# For issue https://github.com/bootc-dev/bootc/issues/1812
187+
include:
188+
- test_os: centos-9
189+
variant: composefs-sealeduki-sdboot
190+
experimental: true
185191

186192
runs-on: ubuntu-24.04
187193

@@ -196,13 +202,18 @@ jobs:
196202

197203
- name: Setup env
198204
run: |
199-
BASE=$(just pullspec-for-os ${{ matrix.test_os }})
205+
BASE=$(just pullspec-for-os base ${{ matrix.test_os }})
206+
BUILDROOTBASE=$(just pullspec-for-os buildroot-base ${{ matrix.test_os }})
200207
echo "BOOTC_base=${BASE}" >> $GITHUB_ENV
208+
echo "BOOTC_buildroot_base=${BUILDROOTBASE}" >> $GITHUB_ENV
201209
echo "BOOTC_variant="${{ matrix.variant }} >> $GITHUB_ENV
202210
203211
- name: Build container
204212
run: |
205213
just build-integration-test-image
214+
# Extra cross-check (duplicating the integration test) that we're using the right base
215+
used_vid=$(podman run --rm localhost/bootc-integration bash -c '. /usr/lib/os-release && echo ${ID}-${VERSION_ID}')
216+
test ${{ matrix.test_os }} = "${used_vid}"
206217
207218
- name: Unit and container integration tests
208219
run: just test-container

Justfile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,15 @@ build-integration-test-image: build
8282
test-composefs:
8383
# These first two are currently a distinct test suite from tmt that directly
8484
# runs an integration test binary in the base image via bcvk
85-
just variant=composefs-sealeduki-sdboot build
86-
cargo run --release -p tests-integration -- composefs-bcvk {{base_img}}
85+
just _composefs-build-image
86+
cargo run --release -p tests-integration -- composefs-bcvk {{integration_img}}
8787
# We're trying to move more testing to tmt
8888
just variant=composefs-sealeduki-sdboot test-tmt readonly local-upgrade-reboot
8989

90+
# Internal helper to build integration test image with composefs variant
91+
_composefs-build-image:
92+
just variant=composefs-sealeduki-sdboot build-integration-test-image
93+
9094
# Only used by ci.yml right now
9195
build-install-test-image: build-integration-test-image
9296
cd hack && podman build {{base_buildargs}} -t {{integration_img}}-install -f Containerfile.drop-lbis
@@ -136,9 +140,10 @@ clean-local-images:
136140
podman images --filter "label={{testimage_label}}"
137141
podman images --filter "label={{testimage_label}}" --format "{{{{.ID}}" | xargs -r podman rmi -f
138142

139-
# Print the container image reference for a given short $ID-VERSION_ID
140-
pullspec-for-os NAME:
141-
@jq -r --arg v "{{NAME}}" '.[$v]' < hack/os-image-map.json
143+
# Print the container image reference for a given short $ID-VERSION_ID for NAME
144+
# and 'base' or 'buildroot-base' for TYPE (base image type)
145+
pullspec-for-os TYPE NAME:
146+
@jq -r --arg v "{{NAME}}" '."{{TYPE}}".[$v]' < hack/os-image-map.json
142147

143148
build-mdbook:
144149
cd docs && podman build {{base_buildargs}} -t localhost/bootc-mdbook -f Dockerfile.mdbook

hack/os-image-map.json

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
{
2-
"rhel-9.8": "images.paas.redhat.com/bootc/rhel-bootc:latest-9.8",
3-
"rhel-10.2": "images.paas.redhat.com/bootc/rhel-bootc:latest-10.2",
4-
"centos-9": "quay.io/centos-bootc/centos-bootc:stream9",
5-
"centos-10": "quay.io/centos-bootc/centos-bootc:stream10",
6-
"fedora-42": "quay.io/fedora/fedora-bootc:42",
7-
"fedora-43": "quay.io/fedora/fedora-bootc:43",
8-
"fedora-44": "quay.io/fedora/fedora-bootc:rawhide"
2+
"base": {
3+
"centos-9": "quay.io/centos-bootc/centos-bootc:stream9",
4+
"centos-10": "quay.io/centos-bootc/centos-bootc:stream10",
5+
"fedora-42": "quay.io/fedora/fedora-bootc:42",
6+
"fedora-43": "quay.io/fedora/fedora-bootc:43",
7+
"fedora-44": "quay.io/fedora/fedora-bootc:rawhide"
8+
},
9+
"buildroot-base": {
10+
"centos-9": "quay.io/centos/centos:stream9",
11+
"centos-10": "quay.io/centos/centos:stream10",
12+
"fedora-42": "quay.io/fedora/fedora:42",
13+
"fedora-43": "quay.io/fedora/fedora:43",
14+
"fedora-44": "quay.io/fedora/fedora:rawhide"
15+
}
916
}

tests/build-sealed

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ if test -z "${secureboot}"; then
5858
cd -
5959
fi
6060

61-
runv podman build -t $output_image --build-arg=COMPOSEFS_FSVERITY=${cfs_digest} --build-arg=base=${input_image} \
61+
runv podman build -t $output_image \
62+
--build-arg=COMPOSEFS_FSVERITY=${cfs_digest} \
63+
--build-arg=base=${input_image} \
64+
--build-arg=buildroot=${BOOTC_buildroot_base} \
6265
--secret=id=key,src=${secureboot}/db.key \
6366
--secret=id=cert,src=${secureboot}/db.crt -f Dockerfile.cfsuki .

0 commit comments

Comments
 (0)