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

Add commit SHA to branch / edge images #114

Closed
devinrsmith opened this issue Aug 8, 2024 · 5 comments · Fixed by #115
Closed

Add commit SHA to branch / edge images #114

devinrsmith opened this issue Aug 8, 2024 · 5 comments · Fixed by #115
Assignees
Labels
enhancement New feature or request

Comments

@devinrsmith
Copy link
Member

This is similar to #46, but specifically focused on adding commit SHA details to branch / edge images. We should be able to capture environment / checkout details for these branch / edge workflows and pass through those details into the image.

@devinrsmith devinrsmith added the enhancement New feature or request label Aug 8, 2024
@devinrsmith
Copy link
Member Author

This feature could also be considered more widely solved via deephaven/deephaven-core#3705; that said, there is still room for us to add deephaven-server-docker build sourced information, even if the above issue is completed.

@stanbrub
Copy link
Collaborator

stanbrub commented Aug 9, 2024

Are you thinking of something like the following idea for the interim?

docker build --build-arg GIT_COMMIT=$(git rev-parse HEAD) -t my_image:my_tag

Or ${{ GITHUB_SHA }}?

That would mean it's captured in the image, but it would not be reachable in a native build.

@stanbrub
Copy link
Collaborator

Here's an example to set the deephaven-core commit hash to an environment variable in the docker image. https://github.com/deephaven/deephaven-server-docker/compare/main...stanbrub:deephaven-server-docker:commit-hash-in-image?expand=1. Not complete but shows something working.

@devinrsmith
Copy link
Member Author

Yes, something like that. I think we want to ultimately propagate it into the LABEL field.

I would have hoped that the checkout action had an official output, but it looks like it doesn't (although, it seems like a pretty popular feature request, actions/checkout#209).

@devinrsmith
Copy link
Member Author

org.opencontainers.image.revision would be the best label; https://github.com/opencontainers/image-spec/blob/main/annotations.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants