devcontainers / devcontainers/ci
Allow for array specification for elements accepting multiple values.
- Lingua principale
- TypeScript
- Stelle
- 496
- Fork
- 101
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Azure DevOps pipeline definitions (and potentially GitHub Actions as well, but I haven't done much with them) allows for inputs to tasks and template parameters to be arrays.
Where possible, please consider switching to using this functionality, instead of whatever other style is used currently. It would mean the definition could look like this:
```yaml
- task: DevcontainersCi@0
inputs:
imageName: $(RegistryImage)
# Currently imageTag is a comma separated list
imageTag:
- $(VersionTag)
- ${{ if parameters.pushLatest }}:
- latest
push: filter
sourceBranchFilterForPush: refs/heads/main
# Currently cacheFrom requires a multi-line definition
cacheFrom:
- $(RegistryImage):latest
- $(RegistryImage):$(VersionTag)
noCache: ${{ parameters.noCache }}
```
... instead of:
```yaml
- task: DevcontainersCi@0
inputs:
imageName: $(RegistryImage)
${{ if parameters.pushLatest }}:
imageTag: $(VersionTag),latest
${{ else }}:
imageTag: $(VersionTag)
push: filter
sourceBranchFilterForPush: refs/heads/main
# To get multiple items
cacheFrom: |
$(RegistryImage):latest
$(RegistryImage):$(VersionTag)
noCache: ${{ parameters.noCache }}
```
As an aside, there appears to be **no** documentation around how to pass multiple elements to `cacheFrom`. It doesn't complain if you pass a comma-separated list (somehow), but it only generates a single `--cache-from` argument, instead of a separate one for each image.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Nell’issue non sono indicati file o test. Inizia tracciando il modo in cui la Azure DevOps task e la GitHub Action leggono gli input imageTag e cacheFrom, quindi confronta la generazione degli argomenti; il lavoro è completato quando gli array supportati producono valori separati e l’uso di più valori per cacheFrom è documentato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure, github-actions, typescript
- Ambito
- ci-cd, devops
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 32/100