1
votes

I have a VSTS build setup with multiple agent phases, like this:

  1. Agent 1 (Hosted by MS): Build a WAR file using Maven
  2. Agent 2 (On-premise, private): Copy file to target VM behind firewall

On phase 2, I have the setting under Execution Plan for "Run this phase" set to "Only when all previous phases have succeeded." Per Microsoft's own documentation, this is what it should be set to if I want the phases to run sequentially. Parallelism on both phases is set to "None."

However, when I run the build, both phases run simultaneously. Why?

I don't want to just build the file on my on-premise agent because I don't want to install Maven there, for reasons.

2

2 Answers

3
votes

Make sure that the previous phase is selected as the Dependency: enter image description here

0
votes

Agent Phases do not execute sequentially is mainly caused by the Parallelism option set as Multi-configuration or Multi-agent for an agent phase at least.

So please check all the agent phases, and make sure the Parallelism options as None for all agent phases.

enter image description here