问题
I'm using AWS and created a CodePipeline using multiple resources (CodeCommit). I properly getting events like this:
{'CodePipeline.job': {'id': '...
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.
回答1:
It is not supported yet, but will be in the future. Right now, maybe you could work around by tracking the eventname of StartPipelineExecution in cloudtrail and compare it with the commit time of the source.
回答2:
I am pretty sure you can get the commit message from codepipeline:
aws codepipeline get-pipeline-state --name PIPELINE_NAME
try parsing it using jq, or bash
来源:https://stackoverflow.com/questions/53556665/find-which-resource-triggered-codepipeline-when-multiple-resources-from-codecomm