【发布时间】:2016-11-11 10:50:53
【问题描述】:
我尝试部署托管在 S3 上的构建存档并在 beforeInstall 期间收到以下错误:
Script does not exist at specified location: /opt/codedeploy-agent/deployment-root/47208456650-458497-4028-97qa6-ef3a7sa30fa96f/d-0S472LBGI/deployment-archive/deployment/backup.sh
我的构建档案只包含源代码。构建脚本永久位于我的服务器上。
AppSpec.yml 看起来像
version: 0.0
os: linux
files:
- source: /build.tgz
destination: /var/www/proj/deployment <- deployment scripts are here
hooks:
BeforeInstall:
- location: backup.sh
runas: root
timeout: 300
AfterInstall:
- location: deploy.sh
runas: root
timeout: 300
ApplicationStart:
- location: applicationStart.sh
runas: root
timeout: 300
【问题讨论】:
-
只需添加到@Castrohenge,脚本的位置是相对于源包,而不是目标文件夹。这就是它找不到 backup.sh 脚本的原因
标签: amazon-web-services deployment continuous-integration aws-code-deploy