在CodePipeline中获取提交ID(Getting Commit ID in CodePipeline)

编程入门 行业动态 更新时间:2024-10-27 21:26:11
CodePipeline中获取提交ID(Getting Commit ID in CodePipeline)

我在CodePipeline使用CodeCommit 。 使用push to master分支自动触发构建。 在CodePipeline控制台中,我清楚地看到我正在接收提交ID,但我需要在构建环境中获取它,因此我可以在构建它时将它们作为标记添加到ECS图像。 有没有办法进入构建环境。

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.

最满意答案

您可以使用CODEBUILD_RESOLVED_SOURCE_VERSION环境变量来检索构建时CodePipeline中显示的提交哈希。

You can use the CODEBUILD_RESOLVED_SOURCE_VERSION environment variable to retrieve the commit hash displayed in CodePipeline at build time.

更多推荐

本文发布于:2023-07-31 18:38:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1347312.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:CodePipeline   ID   Commit

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!