![](/img/trans.png)
[英]AWS CodeDeploy error - The deployment failed because a specified file already exists at this location
[英]AWS code deploy fails with error : specified file already exists at this
我嘗試了 2 個案例
使用 github 作為存儲庫
多次使用代碼管道進行新部署到所需位置:在這種情況下,代碼部署代理會自動覆蓋文件。
在安裝位置 (/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
這將起作用。
version: 0.0
os: linux
files:
- source: /
destination: /var/www/html/
file_exists_behavior: OVERWRITE
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.