philthy
philthy

Reputation: 978

Azure Pipelines - Same hosted agent across stages

How can I have the same hosted agent across multiple stages? For example. Build the solution in one stage, then run tests against those build files in another stage. Without publishing the build files to artifacts.

Upvotes: 5

Views: 2687

Answers (1)

Levi Lu-MSFT
Levi Lu-MSFT

Reputation: 30373

It is not possible on Microsoft hosted agent. Each job will run on a fresh virtual machine which will be discarded after one use.

You will have to publish the build files as artifacts using publish build artifacts task. And use download build artifacts task to download the build files in other stages/jobs.

If you donot want to use publish and download artifacts task. You will need to create self-your hosted agent. It is workable on self-hosted agent.

Upvotes: 5

Related Questions