Skip to content

Commit 6e61352

Browse files
gwleclercclaude
andcommitted
ci(docker): smoke-test the image before publishing it
The deploy job now builds the native amd64 image locally (--load) from the downloaded artifact and runs the smoke test before pushing anything, so a broken image can never reach the registry. The build job's smoke test can't catch artifact-level issues (e.g. the executable bit lost through the artifact round-trip) because it builds the binary locally, not from the artifact. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 3cecef2 commit 6e61352

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,14 @@ deploy-docker:
237237
# Assemble and push the multi-arch image from the pre-built binaries. No compilation and no
238238
# QEMU: every target stage is COPY-only (the cert stage runs on the build platform).
239239
docker buildx create --use
240+
# Smoke-test BEFORE publishing anything: build the native amd64 image locally (--load) from the
241+
# exact downloaded artifact — which has lost its executable bit through the GitHub artifact
242+
# round-trip — then run it and check it serves. Nothing is pushed unless this passes, so a
243+
# broken image can never reach the registry (the build job's smoke can't catch this: it builds
244+
# the binary locally, never from the artifact).
245+
docker buildx build --load --platform linux/amd64 --tag $(DOCKER_IMAGE):$(DOCKER_TAG) .
246+
$(MAKE) start-docker smoke-docker
247+
docker rm -f $(APPNAME) >/dev/null 2>&1 || true
240248
ifdef IS_SEMVER
241249
docker buildx build --push --platform $(DOCKER_PLATFORMS) --tag $(DOCKER_IMAGE):latest .
242250
endif

0 commit comments

Comments
 (0)