简体   繁体   English

即使成功,如何获取CodeDeploy事件日志?

[英]How to get CodeDeploy event logs even when they are successful?

I work on a deployment process using AWS CodeDeploy. 我使用AWS CodeDeploy进行部署过程。 When there is a failure in one of the scripts specified in appspec.yml, you get this nice little log output giving back STDOUT: 当appspec.yml中指定的脚本之一发生故障时,您会得到以下漂亮的小日志输出,并返回STDOUT:

在此处输入图片说明

However, when all events are successful, it seems there is no way to see STDOUT: 但是,当所有事件都成功时,似乎没有办法看到STDOUT:

在此处输入图片说明

Is there a way to see all STDOUT even when deployment events succeed? 即使部署事件成功,有没有办法查看所有STDOUT?

Someone managed to get the answer to this and here is the solution: 有人设法得到了答案,这是解决方案:

On each instance: 在每个实例上:

cat /opt/codedeploy-agent/deployment-root/deployment-logs/codedeploy-agent-deployments.log

Sorry for the bother, hope it helps somebody one day! 抱歉打扰了,希望有一天能对您有所帮助!

The easiest way to see deployment logs is to set up your instances to upload them to CloudWatch logs. 查看部署日志的最简单方法是设置您的实例以将其上传到CloudWatch日志。 See instructions here . 请参阅此处的说明。

Otherwise, you can view the log data by ssh-ing to the hosts. 否则,您可以通过切入主机来查看日志数据。 See here for more details. 有关更多详细信息,请参见此处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM