0

I encountered an error which I was fighting for a few days already, without success. I have a multistage pipeline written for Azure DevOps and Self-Hosted agent, is it possible to run multiple concurrent runs, for different branches on a different workspace?

I mean, I have queued runs for: dev, dev2, master, etc., and I wanna run three concurrent runs in separate workspaces for them.

Michal
  • 71
  • 1
  • 1
  • 3

1 Answers1

0

You need to install multiple instances of the agent on your build agent. One agent only runs 1 job at a time. But you can just install as many copies of the agent on the same server as you want, just extract the agent to a new folder and register it.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • Okay, but in this case, how to execute the whole pipeline run on one Agent? I have a multistage pipeline, one stage needs built code from another, and I'm not using artifacts. I just set `checkout: none` in jobs. – Michal Mar 04 '22 at 07:28
  • That isn't how Azure Pipelines works. If you're using jobs and stages you should really be using artifacts. – jessehouwing Mar 04 '22 at 07:30
  • If you always run the jobs on the same server, you could fiddle around with the agent demands and use something like the agents hostname https://learn.microsoft.com/en-us/azure/devops/pipelines/process/demands?view=azure-devops&tabs=yaml, but each agent will have its own working directory and each job will be executed in a subfolder underneath that. So you won't end up in the same work folder with the build output in it. – jessehouwing Mar 04 '22 at 07:34
  • but it will use a lot of space, even if I'll be using `artifacts Type: file path`. I basically need just code from the very last stage, and I need to store it on file share. – Michal Mar 04 '22 at 07:45
  • Yes. That's true, but it it what it is. – jessehouwing Mar 04 '22 at 07:49