CodeDeploy代理在解压缩的修订目录中的相对修订路径"appspec.yml"处未找到AppSpec文件. [英] CodeDeploy agent did not find an AppSpec file within the unpacked revision directory at revision-relative path "appspec.yml"
问题描述
CodeDeploy代理在解压缩的修订目录中的相对修订路径"appspec.yml" 中找不到AppSpec文件.
The CodeDeploy agent did not find an AppSpec file within the unpacked revision directory at revision-relative path "appspec.yml".
修订版已解压缩到目录"/opt/codedeploy-agent/deployment-root/0bb5a5aa-5894-4575-a69c-a7a4e79b4cdf/d-HQ5GBC7SW/deployment-archive"
The revision was unpacked to directory "/opt/codedeploy-agent/deployment-root/0bb5a5aa-5894-4575-a69c-a7a4e79b4cdf/d-HQ5GBC7SW/deployment-archive"
AppSpec文件是预期的,但在路径上找不到"/opt/codedeploy-agent/deployment-root/0bb5a5aa-5894-4575-a69c-a7a4e79b4cdf/d-HQ5GBC7SW/deployment-archive/appspec.yml"
The AppSpec file was expected but not found at path "/opt/codedeploy-agent/deployment-root/0bb5a5aa-5894-4575-a69c-a7a4e79b4cdf/d-HQ5GBC7SW/deployment-archive/appspec.yml".
推荐答案
我遇到了同样的问题,另一个答案帮助我得出了正确的结论.在我的情况下,我的git repo中有appspec.yml
文件,但是我忘记了将其添加到工件文件部分.结果,appspec.yml
没有包含在zip中,因此部署步骤找不到它.
I had the same problem and the other answer helped me reach the right conclusion. In my situation, I had the appspec.yml
file in my git repo, but I forgot to add it to the artifact files section. As a result, the appspec.yml
wasn't included in the zip and so the deployment step couldn't find it.
在您的buildspec.yml
中,添加:
artifacts:
files:
- appspec.yml
- ... other files to include in your build ...
我的部署配置中也有其他错误.查看日志文件的底部有助于发现它们:
I had some other errors in my deployment configuration too. Looking at the bottom of the log file helped discover them:
less /var/log/aws/codedeploy-agent/codedeploy-agent.log
有一次,当我尝试运行部署并且停止并重新启动codedeploy代理无济于事时,我的EC2实例也挂起.我必须完全重新启动EC2实例.
At one point, my EC2 instance also hung when trying to run a deployment and stopping and restarting the codedeploy agent didn't help. I had to completely restart the EC2 instance.
这些文档对您有帮助: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html
These docs where helpful: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html
这篇关于CodeDeploy代理在解压缩的修订目录中的相对修订路径"appspec.yml"处未找到AppSpec文件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!