Skip to content

Commit 94be3c9

Browse files
committed
test: Add more distros for composefs test
Signed-off-by: Xiaofeng Wang <[email protected]>
1 parent c797b37 commit 94be3c9

File tree

4 files changed

+30
-15
lines changed

4 files changed

+30
-15
lines changed

.github/workflows/ci.yml

Lines changed: 8 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
@@ -178,9 +178,8 @@ jobs:
178178
strategy:
179179
fail-fast: false
180180
matrix:
181-
# TODO expand this matrix, we need to make it better to override the target
182181
# OS via Justfile variables too
183-
test_os: [centos-10]
182+
test_os: [fedora-42, fedora-43, fedora-44, centos-9, centos-10]
184183
variant: [composefs-sealeduki-sdboot]
185184

186185
runs-on: ubuntu-24.04
@@ -196,13 +195,18 @@ jobs:
196195

197196
- name: Setup env
198197
run: |
199-
BASE=$(just pullspec-for-os ${{ matrix.test_os }})
198+
BASE=$(just pullspec-for-os base ${{ matrix.test_os }})
199+
BUILDROOT-BASE=$(just pullspec-for-os buildroot-base ${{ matrix.test_os }})
200200
echo "BOOTC_base=${BASE}" >> $GITHUB_ENV
201+
echo "BOOTC_buildroot_base=${BUILDROOT-BASE}" >> $GITHUB_ENV
201202
echo "BOOTC_variant="${{ matrix.variant }} >> $GITHUB_ENV
202203
203204
- name: Build container
204205
run: |
205206
just build-integration-test-image
207+
# Extra cross-check (duplicating the integration test) that we're using the right base
208+
used_vid=$(podman run --rm localhost/bootc-integration bash -c '. /usr/lib/os-release && echo ${ID}-${VERSION_ID}')
209+
test ${{ matrix.test_os }} = "${used_vid}"
206210
207211
- name: Unit and container integration tests
208212
run: just test-container

Justfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,10 @@ clean-local-images:
136136
podman images --filter "label={{testimage_label}}"
137137
podman images --filter "label={{testimage_label}}" --format "{{{{.ID}}" | xargs -r podman rmi -f
138138

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
139+
# Print the container image reference for a given short $ID-VERSION_ID for NAME
140+
# and 'base' or 'buildroot-base' for TYPE (base image type)
141+
pullspec-for-os TYPE NAME:
142+
@jq -r --arg v "{{NAME}}" '."{{TYPE}}".[$v]' < hack/os-image-map.json
142143

143144
build-mdbook:
144145
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)