Skip to content

Conversation

matt-oakes
Copy link
Contributor

Set the CAPROVER_GIT_COMMIT_SHA env var automatically when building

When we are able to and the environment variable isn't already in use, we set the CAPROVER_GIT_COMMIT_SHA env var to the git has that is being deployed. This allows it to be used when building the image and can be copied into the image to use a runtime as well.

Tests performed

Closes #922

When we are able to and the environment variable isn't already in use,
we set the CAPROVER_GIT_COMMIT_SHA env var to the git has that is being
deployed. This allows it to be used when building the image and can be
copied into the image to use a runtime as well.

Fixes caprover#922
@githubsaturn
Copy link
Collaborator

Thanks, this is great!

@nickdbush
Copy link

Hi Matt,
I've upgraded my instance of Caprover to 1.10.0 (confirmed in the settings page) and deployed the test app from your git repo -- however, the sha does not seem to be propagating: http://test-git.fabric.studentnewspaper.org/

I have made no other changes to the app config (no other environment variables). I'm not sure what sort of information would be helpful in tracking down the issue, but am happy to provide whatever may be needed.

Thanks for getting the PR into Caprover though, this will be really helpful for a project I'm working on!

@nickdbush
Copy link

Moved to #1198

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.

pass git revision to docker build as build arg?
3 participants