Skip to content

feat: pass GIT_SHA/GIT_BRANCH/VERSION build args to docker build#390

Merged
barnabasbusa merged 2 commits into
ethpandaops:masterfrom
edg-l:feat/pass-git-metadata-build-args
Jun 5, 2026
Merged

feat: pass GIT_SHA/GIT_BRANCH/VERSION build args to docker build#390
barnabasbusa merged 2 commits into
ethpandaops:masterfrom
edg-l:feat/pass-git-metadata-build-args

Conversation

@edg-l
Copy link
Copy Markdown
Contributor

@edg-l edg-l commented Jun 5, 2026

Forwards GIT_SHA, GIT_BRANCH and VERSION to the docker build in the deploy action. GIT_SHA is the full commit that's already computed for COMMIT_HASH, GIT_BRANCH is the source ref, and VERSION is the source ref plus the short commit (e.g. main-626c2f2).

We changed the ethrex Dockerfile and it now reads these build args to stamp the version into the image. Without them the ethpandaops/ethrex images report an unknown version/commit and the OCI revision/version labels come out empty.

The values are already on hand here, so this just passes them through. Clients that don't declare the matching ARGs ignore them (BuildKit drops unused build args), same as COMMIT_HASH today.

Clients whose Dockerfile no longer copies .git (e.g. ethrex after its
BuildKit modernization) rely on these build args to stamp version metadata.
Without them the binary reports an 'unknown' branch/sha and the OCI
revision/version labels are empty. Reuses the already-computed full commit
hash and the requested source ref.
@edg-l edg-l marked this pull request as ready for review June 5, 2026 07:02
Keeps VERSION distinct from GIT_BRANCH and pins the build in the OCI version label.
@barnabasbusa barnabasbusa merged commit 8aae63e into ethpandaops:master Jun 5, 2026
3 checks passed
@edg-l edg-l deleted the feat/pass-git-metadata-build-args branch June 5, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants