Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile: Turn on ENABLE_GIT_VERSION #843

Merged

Conversation

tserong
Copy link
Contributor

@tserong tserong commented Nov 28, 2023

ENABLE_GIT_VERSION works fine when ceph is checked out normally, but not when it's a submodule of s3gw that's copied into the Docker build environment (".git" is a file that refers to a parent directory that doesn't exist in this case). Happily, we can cheat by mounting the s3gw directory into the buildenv, then we can run a couple of git commands inside there to extract the commit hash and version tags ceph needs then save them to /srv/ceph/src/.git_version where they'll be picked up by the ceph build.

Fixes: https://github.com/aquarist-labs/s3gw/issues/431

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • CHANGELOG.md has been updated should there be relevant changes in this PR.

ENABLE_GIT_VERSION works fine when ceph is checked out normally,
but not when it's a submodule of s3gw that's copied into the Docker
build environment (".git" is a file that refers to a parent directory
that doesn't exist in this case).  Happily, we can cheat by mounting
the s3gw directory into the buildenv, then we can run a couple of git
commands inside *there* to extract the commit hash and version tags
ceph needs then save them to /srv/ceph/src/.git_version where they'll
be picked up by the ceph build.

Fixes: https://github.com/aquarist-labs/s3gw/issues/431
Signed-off-by: Tim Serong <[email protected]>
Copy link
Contributor

@jecluis jecluis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat :)

@jecluis jecluis merged commit b130148 into s3gw-tech:main Nov 30, 2023
@tserong tserong deleted the wip-use-ENABLE_GIT_VERSION-with-extra-magic branch November 30, 2023 21:28
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.

Release builds don't have a proper ceph version set
2 participants