2

We have deployed Azure devops Self-hosted Agent in our own agentpool.

enter image description here

We have also purchased 4 parallel job per agent , but when our build runs, it runs only one job at a time and other pipeline/release jobs have to wait.

How can we run 4 parallel pipeline/release jobs ?

enter image description here

8
  • So what Monthly purchase 4 will do ? We want only one Agent and run 4 jobs in parallel . If we build 4 agents then no purchase of parallel job required
    – user888263
    Apr 16, 2021 at 12:00
  • Monthly purchase 4 allows you to run 4 more parallel jobs. Currently, you can run 46 parallel jobs. Without Monthly purchase 4, you can only run 42 parallel jobs. This refers to the number of parallel jobs you can run.
    – Hugh Lin
    Apr 19, 2021 at 9:39
  • And running a parallel job needs to occupy one agent, so the parallel jobs you can actually run are also determined by how many self-hosted agents you set.
    – Hugh Lin
    Apr 19, 2021 at 9:40
  • 1
    So basically Azure Devops offers only one executor per agent . Is there a enhancement in future to have multiple executors per agent ?
    – user888263
    Apr 20, 2021 at 12:01
  • Yes, open the run.cmd in the local agent folder, you can find that in the cmd window, if you want to run the next job, you need to wait for the previous run to complete, just like you can't execute two commands at the same time in a cmd.exe . So I am afraid it's not possible to have multiple executors per agent.
    – Hugh Lin
    Apr 21, 2021 at 7:39

2 Answers 2

4

How can we run 4 parallel pipeline/release jobs ?

According to your screenshot, you seem to only register one self-hosted agent, and running a parallel job will consume one agent, so if you want to run 4 jobs in parallel, you need to register at least 4 self-hosted agents.

1
  • By default 1 parallel job is free for certain number of minutes - does parallel job mean 2 jobs?
    – variable
    Jun 13, 2022 at 10:42
0

Running parallel jobs on the same agent can be achieved by container jobs

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/container-phases?view=azure-devops-2019#multiple-jobs-with-agent-pools-on-a-single-hosted-agent

There is a small gotcha around being logged out when multiple jobs are running at the same time and a Docker workaround suggested here

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/container-phases?view=azure-devops-2019#multiple-jobs-with-agent-pools-on-a-single-hosted-agent

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.