Skip to content

fix(docker): resolve git revision in Dockerfile#104

Open
JanZachmann wants to merge 2 commits intoomnect:mainfrom
JanZachmann:fix/git-short-rev-docker
Open

fix(docker): resolve git revision in Dockerfile#104
JanZachmann wants to merge 2 commits intoomnect:mainfrom
JanZachmann:fix/git-short-rev-docker

Conversation

@JanZachmann
Copy link
Contributor

Summary

  • Added a git-info Dockerfile stage that extracts GIT_SHORT_REV from .git directly, replacing the fragile ARG GIT_SHORT_REV="unknown" default
  • Removed GIT_SHORT_REV build-arg plumbing from build-and-deploy-image.sh
  • Version bump to 1.1.1

Reason

The Concourse CI pipeline does not pass BUILD_ARG_GIT_SHORT_REV, so all production Docker images were built with "unknown" as the git revision. The new git-info stage makes the build self-contained — no caller needs to pass the build arg.

Verification

  • docker buildx build -f Dockerfile . without --build-arg GIT_SHORT_REV embeds the actual git short rev
  • Local cargo build -p omnect-ui still resolves the git rev via the build.rs fallback
  • scripts/build-and-deploy-image.sh works without changes to callers

… build arg

The GIT_SHORT_REV build arg defaulted to "unknown" and was never passed
by the Concourse CI pipeline, so production images shipped without the
actual git revision. Add a dedicated git-info Dockerfile stage that
extracts the revision from .git directly, making the build self-contained.

Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
…ocker

Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
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.

1 participant

Comments