从CodeCommit查找多个资源时,查找哪个资源触发了CodePipeline [英] Find which resource triggered CodePipeline when multiple resources from CodeCommit

查看:91
本文介绍了从CodeCommit查找多个资源时,查找哪个资源触发了CodePipeline的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用AWS,并使用多种资源(CodeCommit)创建了CodePipeline。我正确地收到了这样的事件:

I'm using AWS and created a CodePipeline using multiple resources (CodeCommit). I properly getting events like this:

{'CodePipeline.job': {'id': '...

在这种情况下,我可以找到每个CodeCommit资源的最新提交,但没有找到如何确定具体的资源触发了CodePipeline执行。这可行吗?谢谢您的帮助。

In this event I can find the latest commit for each CodeCommit resource but I did not find how I can determine which specific resource triggered the CodePipeline execution. Is it something doable ? Thanks for your help.

推荐答案

我很确定您可以从代码管道中获取提交消息:

I am pretty sure you can get the commit message from codepipeline:

aws codepipeline get-pipeline-state --name PIPELINE_NAME

尝试使用jq或bash解析它

try parsing it using jq, or bash

这篇关于从CodeCommit查找多个资源时,查找哪个资源触发了CodePipeline的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆