我正在尝试使用AWS代码管道设置我的项目部署,并且当我的部署失败而没有代码管道日志时,我想获得电子邮件通知,因此我没有每次都登录到AWS帐户来查看日志。
我搜索了各种博客,文档和示例,但没有帮助。
我用来创建AWS-cloudwatch规则的以下JSON:
{
"detail-type": [
"CodePipeline Stage Execution State Change",
"CodePipeline Action Execution State Change",
"CodePipeline Pipeline Execution State Change"
],
"source": [
"aws.codepipeline"
],
"detail": {
"pipeline": [
"ui-pipeline"
],
"state": [
"FAILED"
]
}
}
我收到的电子邮件包含以下JSON:
{
"version":"0",
"id":"xxx-493f-de1d-94b7-xxx",
"detail-type":"CodePipeline Stage Execution State Change",
"source":"aws.codepipeline",
"account":"xxxx",
"time":"2019-06-13T05:50:17Z",
"region":"ap-south-x",
"resources":[
"arn:aws:codepipeline:ap-south-1:xxx:ui-pipeline"
],
"detail":{
"pipeline":"ui-pipeline",
"execution-id":"xxx-fbcf-40f7-xxx-xxxx",
"stage":"Deploy",
"state":"FAILED",
"version":1.0
}
}
我也想要AWS代码管道的日志。
答案 0 :(得分:0)
从根本上讲,CodePipeline除了会给出关于失败的最终错误消息外,没有提供任何有关失败的详细信息(因为这些错误在特定阶段仍然大部分可见),并且在获得错误时甚至无法通过Paylod看到该错误。传递给事件。这是CodePipeline的局限性