如何在Codedeploy中查看测试结果

时间:2018-05-08 22:49:57

标签: amazon-web-services aws-code-deploy

我想在codepipeline中有一个测试阶段。为此,我创建了一个codedeploy作为codepipeline的一个阶段,appspec.yml是:

version: 0.0
os: linux
files:
  - source: test
    destination: /mycodedeploy/test
hooks:
  AfterInstall:
    - location: test/run_test.sh
    - timeout: 3600

代码部署成功完成,但我没有在AWS控制台中看到test / run_test.sh的测试结果。 我在哪里可以看到测试结果?

"Ran 1 test in 0.000s

OK" 

1 个答案:

答案 0 :(得分:2)

除非您将实例配置为将日志发布到CloudWatch,否则您将无法在AWS控制台中看到脚本中的日志。

您应该可以在此处查看主机上的日志:/opt/codedeploy-agent/deployment-root/deployment-logs/codedeploy-agent-deployments.log。如果您不将它们发布到CloudWatch,则必须手动查看主机。 Here's more information on CodeDeploy agent logging.