test(ci): smoke-test the tools that built images take from their base

The CSI, LINSTOR, multus, Harbor and redis-backup images call tools at
runtime that their base images or build stages install: mkfs and
mount.nfs, drbd, lvm and zfs, the CNI plugins, nginx and trivy under a
fixed uid, redis 8. A base or tool bump that drops one still builds,
and only fails once the image runs in a cluster.

The kubevirt CSI node plugin and its sidecars run inside tenant VMs on
whatever vCPU they are given, so their filesystem tools, libc and Go
entrypoints must not require more than x86-64-v2. C objects declare
that level in a GNU property note and Go binaries in their GOAMD64
build setting; a file that records neither fails the check.

Each PR build job runs the checks against the images it pushed, found
by diffing the tree's image references before and after the build.
Fork PRs are skipped because their images are not in a registry yet,
and the unit lane runs no container. A change to kubevirt-csi-node
alone, where the node sidecar tags live, now runs the kubevirt CSI
build too, and the check fails when either sidecar is missing or the
reference file cannot be read.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
Aleksei Sviridkin committed 2026-11-16 01:07:36 +03:00
1 parent 29fb27461e
commit 9cd2d3ac0f
6 files changed
+204 -2

No files matched your search

+14
View File
@@ -482,6 +482,8 @@ jobs:
buildkitd-config: hack/buildkitd.toml
env:
DOCKER_CONFIG: ${{ runner.temp }}/.docker
- name: Record image references before the build
run: sh -c '. hack/lib/image-refs.sh; collect_image_refs packages' | sort -u > "$RUNNER_TEMP/image-refs-before"
- name: Build ${{ matrix.pkg }}
run: |
mkdir -p _out/oci
@@ -511,6 +513,18 @@ jobs:
# against the package dir — the archive would land in <pkg>/_out/oci and
# miss the repo-root _out/oci the upload reads.
OCI_EXPORT_DIR: ${{ github.event.pull_request.head.repo.fork && format('{0}/_out/oci', github.workspace) || '' }}
# Fork PR images exist only as OCI archives at this point, so there is
# nothing to pull.
- name: Smoke-test the images this job built
if: ${{ !github.event.pull_request.head.repo.fork }}
env:
DOCKER_CONFIG: ${{ runner.temp }}/.docker
COZYTEST_TRACE: '0'
run: |
sh -c '. hack/lib/image-refs.sh; collect_image_refs packages' | sort -u > "$RUNNER_TEMP/image-refs-after"
comm -13 "$RUNNER_TEMP/image-refs-before" "$RUNNER_TEMP/image-refs-after" > "$RUNNER_TEMP/image-refs-built"
cat "$RUNNER_TEMP/image-refs-built"
IMAGE_SMOKE_REFS_FILE="$RUNNER_TEMP/image-refs-built" hack/cozytest.sh hack/image-smoke.bats
- name: Capture digest patch fragment
id: frag
env: