0

我正在尝试使用 AWS Codeploy 部署应用程序。该过程首先将应用程序代码推送到 Bitbucket,然后启动一个创建 zip 工件并将其推送到 S3 存储桶的管道。然后使用 S3 中的文件部署到 CodeDeploy。在 CodeDeploy 中,我开始执行进程停止并显示以下错误的步骤:

The CodeDeploy agent did not find an AppSpec file within the unpacked revision directory at revision-relative path "appspec.yml". The revision was unpacked to directory "/opt/codedeploy-agent/deployment-root/e2caa922-5582-4fcb-bdab-9fc7e63f132c/d-3I2G72WLE/deployment-archive", and the AppSpec file was expected but not found at path "/opt/codedeploy-agent/deployment-root/e2caa922-5582-4fcb-bdab-9fc7e63f132c/d-3I2G72WLE/deployment-archive/appspec.yml". Consult the AWS CodeDeploy Appspec documentation for more information at http://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file.html

我可以访问我尝试在其上部署的 EC2 实例,但无法克服此错误。下面是appspec.yml我创建的。它位于 Bitbucket 存储库中。任何意见,将不胜感激。

应用规范.yml

version: 0.0
os: linux
files:
  - source: /
    destination: /var/www/html
    overwrite: true

hooks:
  BeforeInstall:
    - location: scripts/codedeploy/install_dependencies.sh
      timeout: 300
      runas: root
  AfterInstall:
    - location: scripts/codedeploy/install_composer_dependencies.sh
      timeout: 300
      runas: root
    - location: scripts/codedeploy/start_server.sh
      timeout: 30
      runas: root
  ApplicationStop:
    - location: scripts/codedeploy/stop_server.sh
      timeout: 30
      runas: root
4

0 回答 0