Skip to content

ci(docker): smoke-test the image before publishing it#330

Merged
gwleclerc merged 1 commit into
mainfrom
ci/deploy-pre-push-smoke
Jul 19, 2026
Merged

ci(docker): smoke-test the image before publishing it#330
gwleclerc merged 1 commit into
mainfrom
ci/deploy-pre-push-smoke

Conversation

@gwleclerc

Copy link
Copy Markdown
Collaborator

What

Smoke-test the container image before publishing it, so a broken image can never reach the registry.

The deploy job now, in make deploy-docker:

  1. builds the native linux/amd64 image locally (--load) from the downloaded artifact,
  2. runs it and checks it serves (/version, the embedded UI, and a mock round-trip),
  3. only then pushes the multi-arch image.

Why

The build job already smoke-tests an image, but it builds the binary locally — it never exercises the GitHub artifact round-trip that the deploy job does. That gap let a real bug ship: actions/upload-artifact doesn't preserve the executable bit, so the binary the deploy job packaged was 0644 and the published scratch image failed at startup with /smocker ... not executable (fixed in the Dockerfile via COPY --chmod=0755). This pre-push smoke closes the gap by testing the exact artifact that gets published.

Extends the docker smoke-testing from #68 to the publish path.

Verified

make -n deploy-docker shows nothing is pushed before the smoke passes; locally, building the amd64 image from a deliberately 0644 binary and running the smoke succeeds (serves the UI + mock 200).

🤖 Generated with Claude Code

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>
@gwleclerc
gwleclerc merged commit 1eed302 into main Jul 19, 2026
6 checks passed
@gwleclerc
gwleclerc deleted the ci/deploy-pre-push-smoke branch July 19, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant