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

Commit Hash in Docker Image #115

Merged
merged 39 commits into from
Aug 20, 2024
Merged

Conversation

stanbrub
Copy link
Collaborator

  • Added the deephaven-core SHA the build-ci.yml and edge-ci.yml workflows
  • Used COMMIT_HASH in server and server-slim contexts and hcls
  • Tested Branch CI on my fork. Commit hash appears in manifest:
    • ex docker container inspect ddb093257e90 shows output that contains
    • "org.opencontainers.image.revision": "71646c35b2987e83cf34b53b632498b8aba21332"
  • Only server and server-slim were changed. Do we need any more?
  • Release CI was not touched (I did come up with a possible way.)
    • ex. curl https://api.github.com/repos/deephaven/deephaven-core/commits/v0.35.0 | grep '"sha":' | head -1 | cut -d'"' -f4

.github/workflows/branch-ci.yml Outdated Show resolved Hide resolved
.github/workflows/branch-ci.yml Outdated Show resolved Hide resolved
contexts/server/Dockerfile Outdated Show resolved Hide resolved
server.hcl Outdated Show resolved Hide resolved
.github/workflows/edge-ci.yml Outdated Show resolved Hide resolved
contexts/server-slim/Dockerfile Outdated Show resolved Hide resolved
server-slim.hcl Outdated Show resolved Hide resolved
Copy link
Member

@devinrsmith devinrsmith left a comment

Choose a reason for hiding this comment

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

I think to move this label should only apply to edge / branch builds (using the Dockerfile split staging construct mentioned earlier). Also, does everything work if GIT_REVISION is set to an empty string instead of "not-set"?

@devinrsmith
Copy link
Member

Also, for the release, we probably technically want to point to the tag revision and not the commit revision, if we were to add the LABEL for the release. I could probably argue we should use the tag name (as opposed to the revision SHA) for the GIT_REVISION for release images, but regardless, we would want to do that separately from this PR.

$ git rev-parse v0.35.0     
33d520aef42bc92d22bd5190511dbc6b67f87043

$ git rev-parse release/v0.35.0
d7a2af575e3dfbbc2c429c546c66e783c93358a5

Note the difference.

@stanbrub stanbrub force-pushed the commit-hash-in-image branch from 6cc660f to 4ee94c8 Compare August 15, 2024 19:50
@stanbrub stanbrub requested a review from devinrsmith August 19, 2024 23:34
@stanbrub stanbrub self-assigned this Aug 19, 2024
@stanbrub stanbrub linked an issue Aug 19, 2024 that may be closed by this pull request
Copy link
Member

@devinrsmith devinrsmith left a comment

Choose a reason for hiding this comment

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

LGTM. Please write a merge message describing this a bit more succinctly.

@stanbrub stanbrub merged commit 738a579 into deephaven:main Aug 20, 2024
3 checks passed
@stanbrub stanbrub deleted the commit-hash-in-image branch August 20, 2024 01:53
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.

Add commit SHA to branch / edge images
2 participants