aws / aws/aws-codedeploy-agent

appspec.yml pattern and exclude file globs

Aperta
#151 17 commenti 7 reazioni 0 assegnatari Vedi su GitHub
feature-request needs triage waiting for info
Lingua principale
Rust
Stelle
337
Fork
195
Merge medio
10h 54m
PR unite (30g)
4

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia riproducendo il deployment con l'appspec.yml fornito, concentrandoti sulle voci delle permissions e sulle relative chiavi pattern ed except. Traccia il modo in cui l'agent abbina i file nelle sottodirectory e gestisce le regole di permissions sovrapposte. Il lavoro è completato quando i glob in stile bash funzionano in modo coerente e bin/console viene escluso senza un errore duplicate-permissions.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
aws, yaml
Ambito
devops, release
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.