Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable simultaneous build of the same pipeline in VSTS (Azure DevOps)

I have a build pipeline on VSTS (aka Azure DevOps, as it is known for now) that runs on an agent pool with 2 build agents (agent A and B), with continuous integration set up. I would like to disable simultaneous execution of this build pipeline on different agents, i.e. if there is a build running on agent A, I do not want a build to start running on agent B until the one on agent A is completed.

I can do this by changing the demands to disqualify all but one of the build agents from running the build (e.g. so that only agent A meets the demand). However, this is undesirable as the build agents are shared with other projects, and sometimes the chosen agent would be quite busy, so I do not want to limit the build agent to any specific machine.

Is there a simple way to do this in VSTS?

like image 857
scharnyw Avatar asked Nov 06 '18 09:11

scharnyw


People also ask

How do I disable multi stage Pipelines in Azure DevOps?

Login to your Azure DevOps organization. Click on your profile menu at the top right corner, and select Preview features. Use slider to enable or disable multi-stage pipelines feature.

How do I disable Azure build pipeline?

In my case, the pipeline is called Build, and I will click on the pipeline's options and click on Settings on the right corner, as shown in the screenshot below. I will set the “Processing of new run requests” from the options page to disabled. This action will stop new builds from being triggered by commits requests.

What is parallelism in Azure DevOps?

In Azure Pipelines, you can run parallel jobs on Microsoft-hosted infrastructure or your own (self-hosted) infrastructure. Each parallel job allows you to run a single job at a time in your organization. You do not need to pay for parallel jobs if you are using an on-premises server.

How do you stop continuous integration on Azure DevOps?

Navigate to your team project on Azure DevOps. Navigate to Pipelines | Pipelines. Not to have two pipelines triggered later in the lab, disable the CI trigger for the template created pipeline (uncheck) and Save.


1 Answers

You can use the 'Batch changes while a build is in progress' settings on the trigger page of the build definitions. Docs here: https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops&tabs=yaml

like image 187
Rob Bos Avatar answered Sep 21 '22 01:09

Rob Bos