aws / aws/aws-codedeploy-agent
appspec.yml pattern and exclude file globs
- 主要言語
- Rust
- スター
- 337
- フォーク
- 195
- 平均マージ
- 10時間 54分
- マージ済み PR(30日)
- 4
説明
It would be great if the `pattern` and `exclude` keys accepted bash file globs and worked properly across sub directories. For example, I have a Symfony4 app that looks like:
```
bin/
console
config/
services.yaml
public/
index.php
src/
MyController.php
templates/
my_template.html.twig
```
I want all directories to have mode `750` and all files to have mode `640`. Except for the `bin/console` file which needs mode `750`.
This is the config that I've tried in `appspec.yml`:
```yml
version: 0.0
os: linux
files:
- source: /
destination: /srv/www/app/
permissions:
- object: /srv/www/app
owner: ubuntu
group: www-data
mode: 750
type:
- directory
- object: /srv/www/app
pattern: '**'
except:
- bin/console # also tried 'console' and 'bin/*' and '/srv/www/app/bin/console'
owner: ubuntu
group: www-data
mode: 640
type:
- file
- object: /srv/www/app/bin
owner: ubuntu
group: www-data
mode: 750
type:
- file
```
But I get the following error:
```
The deployment failed because the permissions setting for (/srv/www/app/bin/console) is specified more than once in the application specification file. Update the files section of the AppSpec file, and then try again.
```
I can't seem to find a value which I can put in the `except` key that successfully excludes the `bin/console` file. If it supported bash file globs you could easily do something like `bin/*` because all the files in the bin directory are going to need different permissions.
コントリビューションガイド
調査の方向性
提供されたappspec.ymlを使ってデプロイメントを再現することから始め、permissionsエントリとそのpatternキーおよびexceptキーに重点を置いてください。エージェントがサブディレクトリ全体でファイルをどのように照合し、重複するpermissionsルールをどのように処理するかを追跡してください。bash形式のglobが一貫して機能し、duplicate-permissionsエラーなしでbin/consoleが除外されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- aws, yaml
- 領域
- devops, release
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100