Skip to content

Commit faa333b

Browse files
lcloselclose
authored andcommitted
fix: resolve multi-arch image loading in integration tests
Pull by platform-specific digest instead of the OCI index tag. kind's containerd cannot import multi-arch indexes when only one platform's layers are present locally.
1 parent bf95f9f commit faa333b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/integration-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ jobs:
3232
- name: Pull and load real image into kind
3333
run: |
3434
# Read appVersion from Chart.yaml to stay in sync with the chart.
35-
# Pull the platform-specific image then re-tag to strip the multi-arch
36-
# manifest index, which kind's containerd import cannot handle.
3735
APP_VERSION=$(grep '^appVersion:' helm/disentangle/Chart.yaml | sed 's/appVersion: *"\(.*\)"/\1/')
3836
IMAGE="ghcr.io/disentangle-network/disentangle-node:${APP_VERSION}"
3937
echo "Pulling ${IMAGE} (linux/amd64)"
40-
docker pull --platform linux/amd64 "${IMAGE}"
41-
IMGID=$(docker images --no-trunc -q "${IMAGE}" | head -1)
42-
docker tag "${IMGID}" "${IMAGE}"
38+
# Pull by platform-specific digest to get a single-platform image
39+
# that kind's containerd can import (multi-arch indexes fail).
40+
AMD64_DIGEST=$(docker manifest inspect "${IMAGE}" | jq -r '.manifests[] | select(.platform.architecture=="amd64" and .platform.os=="linux") | .digest')
41+
docker pull "${IMAGE}@${AMD64_DIGEST}"
42+
docker tag "${IMAGE}@${AMD64_DIGEST}" "${IMAGE}"
4343
kind load docker-image "${IMAGE}" --name disentangle-test
4444
4545
- name: Install chart

0 commit comments

Comments
 (0)