VSTS build from multiple repositories

Kangkan picture Kangkan · Mar 30, 2018 · Viewed 7.9k times · Source

I have two repositories - one in TFVC and another in Git. There are specific technical reasons for keeping them separate.

The code in TFVC is built on a private build agent and the code in Git is built on a hosted agent. So currently I have two independent builds and the outcomes of them are deployed together in a release definition.

I am looking at creating builds that may be able to get the source from both the repositories so that I have a single build definition to manage.

Is there a way to achieve this?

Answer

Marina Liu picture Marina Liu · Mar 30, 2018

For now, there is no way to specify multiple repositories in Get sources step. And there has an user voice Allow TFS build to depend on multiple repositories which suggests similar feature, you can vote and follow up.

The workaround for now is manually get the files from the other repo.

Such as, if you specify TFVC repo in Get sources step, then you can add a PowerShell task at the beginning of the tasks, and clone the other git repo by git clone <repo URL> etc.