-
Notifications
You must be signed in to change notification settings - Fork 186
expose git commit revision id as environmental variable to hook steps #36
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
Comments
Seems like a reasonable feature request. Thanks. |
Seconding this feature. Some usage details so you understand our use case: We don't use S3, but instead deploy via CodeDeploy directly from GitHub (GUI: "My application is stored in GitHub" checkbox). We really need a way within an AfterInstall hooks script to be able to get the git commit SHA (GUI: "Commit ID") so it can be put into a file on the server. This would save me having to tell our developers "Just use the GUI" to find out what code is actively on the box (and yes I'm well aware the agent has this information deep within /opt/codedeploy-agent). An environment variable would be absolutely perfect. |
I have the exact same issue and workaround as woodhull. Querying the deployment ID to get the commit id. +1 for this feature request! |
+1 |
9 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
I think this solves it - https://forums.aws.amazon.com/thread.jspa?threadID=226646 |
@apoorv-kumar it doesn't, as far as i understand, the linked thread is about codepipeline and not plain codedeploy |
Added to our task list so we can review this new design decision with the team |
I also have a use case that would benefit. As a workaround, is it possible to query the commit ID through the API (using the AWS CLI, possibly)? |
👍 on this request. As others have noted, the workaround is to use the For example:
|
This patch exposes the commit hash as `BUNDLE_COMMIT` when we are deploying from Github. GHI #36
This feature has been added as part of the 1.4.0 release. |
The 1.4.0 release exposes the commit SHA-1, but does not (yet) provide the repository URL itself for/from which die deployment was triggered. However, that information can be queried through the API when needed.
|
Our CI systems precompiles some artifacts and stores them in S3 with the git revision as the unique identifier.
We'd like the scripts that run on deploy to download the correct version based on the deployed git commit id. Right now it's awkward, since we need to query for the deployment ID and then get the git commit id from there.
The text was updated successfully, but these errors were encountered: