【问题标题】:AWS code deploy fails with error : specified file already exists at thisAWS 代码部署失败并出现错误:指定的文件已经存在
【发布时间】:2021-01-18 22:20:48
【问题描述】:

我试了2个案例

使用 github 作为仓库

  1. 使用代码管道多次将新部署部署到所需位置:在这种情况下,代码部署代理会自动覆盖文件。

  2. 在安装位置(/var/www/html)手动创建文件时,codedeploy 会抛出错误 "部署失败,因为该位置已存在指定文件:/var/www/html/abc.php"

我无法使用第二种情况覆盖文件,

试过了:overwrite:true -> 这不起作用

appspec.yml 文件

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

【问题讨论】:

  • 错误:部署失败,因为此位置已存在指定文件:/var/www/html/

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


【解决方案1】:

这会起作用。

version: 0.0
os: linux
files:
  - source: /
    destination: /var/www/html/
file_exists_behavior: OVERWRITE

【讨论】:

    猜你喜欢
    • 2021-02-16
    • 2017-05-26
    • 2016-12-10
    • 2017-09-18
    • 2016-07-10
    • 2016-05-01
    • 1970-01-01
    • 2018-12-05
    • 2015-03-17
    相关资源
    最近更新 更多