Run first two stages parallelly in Azure DevOps pipeline
Asked Answered
L

1

6

Is it possible to run the first two stages parallelly in Azure DevOps pipelines? By default, Each stage starts only after the preceding stage is complete unless otherwise specified via the dependsOn property.

Current situation is:

enter image description here

I would like to run both the stages, iOS_Dev_Build and iOS_QA_Build parallelly. No dependsOn condition is added for iOS_QA_Build. But by default, it is waiting for the iOS_Dev_Build stage to complete before it starts

Liegnitz answered 25/8, 2022 at 5:31 Comment(0)
E
29

Please add dependsOn: [] in the iOS_QA_Build stage.

My example: enter image description here

stages:
- stage: DEV
  jobs:
  - job: A
    steps:
    - bash: echo "A"
- stage: QA
  dependsOn: []   
  jobs:
  - job: A
    steps:
    - bash: echo "A"

When you define multiple stages in a pipeline, by default, they run sequentially in the order in which you define them in the YAML file. dependsOn: [] removes the implicit dependency on previous stage and causes this to run in parallel.

For more details, please refer Specify dependencies.

Eckblad answered 25/8, 2022 at 6:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.