feat: add org.opencontainers.image.revision OCI label to all container images#1270
feat: add org.opencontainers.image.revision OCI label to all container images#1270ambient-code[bot] wants to merge 1 commit intomainfrom
Conversation
…r images Add GIT_COMMIT build arg and org.opencontainers.image.revision label to all 7 production Dockerfiles so the source commit SHA is embedded in every container image. This enables identifying deployed code via `skopeo inspect` without pulling the image. Also passes GIT_COMMIT in CI workflows (components-build-deploy.yml, prod-release-deploy.yaml) and all Makefile build targets. Closes #1269 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
| File | Component | Mode |
|---|---|---|
components/runners/ambient-runner/Dockerfile |
runner | warn |
No action required — these components are in warn mode. Consider using the component's agent workflow for future changes.
📖 Specs: Runner Spec · Runner Constitution
|
This PR adds the Changes per acceptance criteria:
Note on the operator Dockerfile: The existing 🤖 Session |
Summary
ARG GIT_COMMIT=unknownandLABEL org.opencontainers.image.revision=$GIT_COMMITto the final stage of all 7 production Dockerfiles (backend, frontend, operator, public-api, ambient-runner, state-sync, ambient-api-server)GIT_COMMIT=${{ github.sha }}inbuild-argsfor both push and PR build steps incomponents-build-deploy.ymlGIT_COMMIT=${{ github.sha }}inbuild-argsinprod-release-deploy.yaml(alongside existingAMBIENT_VERSIONwhich is set to the release tag, not a SHA)--build-arg GIT_COMMIT=$(git rev-parse HEAD)in all Makefile build targets (includingkind-reload-*andlocal-reload-api-server)Test plan
podman build --build-arg GIT_COMMIT=$(git rev-parse HEAD) -t test components/backend && podman inspect test | jq '.[0].Config.Labels["org.opencontainers.image.revision"]'build-argsformatskopeo inspect docker://quay.io/ambient_code/vteam_backend:<sha> | jq '.Labels["org.opencontainers.image.revision"]'returns a valid SHA after mergeCloses #1269
🤖 Generated with Claude Code
🤖 Ambient Session