我有一个 appspec.yml 文件位于从 CodeCommit 部署的修订(工件)的根目录中:
version: 0.0
os: linux
files:
- source: /
destination: /home/ec2-user/app/aws
file_exists_behavior: OVERWRITE
hooks:
ApplicationStart:
- location: /home/ec2-user/app/aws/update_wheel.sh
timeout: 300
runas: root
我更改了codedeployagent.yml
我的 ec2 实例(为了处理这个问题;:root_dir:
手动更改不是一个理想的解决方案,即使它可以工作):
/etc/codedeploy-agent/conf/codedeployagent.yml
---
:log_aws_wire: false
:log_dir: '/var/log/aws/codedeploy-agent/'
:pid_dir: '/opt/codedeploy-agent/state/.pid/'
:program_name: codedeploy-agent
:root_dir: '/home/ec2-user/'
:verbose: false
:wait_between_runs: 1
:proxy_uri:
:max_revisions: 2
但我仍然收到这样的错误:
/home/ec2-user/app/aws/update_wheel.sh
Script does not exist at specified location: /home/ec2-user/xxxxxx-cb84-4ef6-966b-xxxxxxxxx/d-xxxxx/deployment-archive/home/ec2-user/app/aws/update_wheel.sh
我真的不明白为什么我要复制files
到 adestination
然后不希望使用这些文件,或者为什么我不应该期望那些(shell 脚本)文件使用它们的原始路径。destination
我应该复制什么source
files
,为什么我不能hooks
期待:root_dir
我在 codeagent 配置中设置的?