我想对模板有多个依赖项。有没有办法在参数数组的迭代中建立条件?
parameters:
deps: [Integration, Migration]
jobs:
- deployment: Deploy
displayName: 'Deploy'
dependsOn:
- ${{ each dep in parameters.deps }}:
- ${{ dep }}
condition:
- ${{ each dep in parameters.deps }}:
- in(dependencies.${{ dep }}.result, 'Succeeded', 'Skipped')
environment: QA
strategy:
runOnce:
deploy:
steps:
- bash: |
echo "Deploy dev"
这个被标记为 (Line: 12, Col: 3): A sequence was not expected