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?