Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run five agent jobs simultaneously in VSTS (Azure DevOps)?

I have created a release pipeline with five agent jobs and I want to start all five jobs at the same time.

example:

vsts

In example I need to start all agent jobs simultaneously, and execute unique task (wait 10 seconds) at the same time.

Does VSTS (Azure DevOps) have option to do this?

like image 563
J. Doe Avatar asked Sep 05 '25 09:09

J. Doe


2 Answers

You could also just use 5 different stages (depending on what exactly it is you're doing). Then you can leverage the full power of the pipeline model, have pre and post stages, whatever you wish. This is as mentioned in the other answers also possible with different agent jobs but this is more straight forward. Also you can easily clone stages.

I'm not sure what it is what you're trying to achieve with waiting for 10 seconds, but this is very easy to do with a PowerShell step. Select the radio button "Inline" and type this:

Start-Sleep -Seconds 10

Example of a pipeline, that might do the simultaneous work that you want, but keep in mind, each agent job (doesn't matter multiple jobs in one stage or multiple single job stages) has to find an agent that is capable, available and idle, otherwise the job(s) will wait in a waiting queue!!!

enter image description here

like image 197
DanDan Avatar answered Sep 09 '25 23:09

DanDan


In the release pipeline click on "Agent job", then expand the "Execution plan" and click on "Multi-agent".

enter image description here

like image 39
Shayki Abramczyk Avatar answered Sep 10 '25 00:09

Shayki Abramczyk