I am using CodePipeline
with CodeCommit
. Builds are triggered automatically with push to master
branch. In CodePipeline
console it is clearly visible that i am receiving commit id but i need to get it in the build environment so i can add them as a tag to the ECS image when i build it. Is there a way to get in in build environment.
You can use the CODEBUILD_RESOLVED_SOURCE_VERSION
environment variable to retrieve the commit hash displayed in CodePipeline at build time.