The following pipeline, with a each .. in ..
iteration, the jobs will run in parallel.
variables:
- name: fruitList
value: mango,peach
stages:
- stage: Dev
jobs:
- ${{ each fruitName in split(parameters.fruitList, ',') }}:
- job: "HELLO_${{ fruitName }}"
steps:
- task: AzureCLI@2
displayName: "Step dynamic ${{ fruitName }}"
inputs:
scriptType: "bash"
scriptLocation: "inlineScript"
inlineScript: |
set -xe
set -o nounset
echo "${{ fruitName }}"
How can I make the jobs run in Sequence, or even better, set a batchCount
to control the maximum number of parallel jobs.