Reputation: 764
When creating a new Build Pipeline, the first stage is to select a repository.
I want to create a build for a Java project on one repository, but also include imports and configurations that reside on a different repository (Both are Azure Repos Git).
Is that possible?
Upvotes: 3
Views: 1014
Reputation: 41545
Update: Microsoft added this feature (in Sprint 161) and if you use YAML pipeline you can clone multiple repos in this way:
resources:
repositories:
- repository: tools
name: tools
type: git
steps:
- checkout: self
- checkout: tools
More info you can find here.
(The old answer)
Currently you can't specify more then one repository in the "Get Sources" phase.
There is a Feature Request about it and the status is On Roadmap
.
You have 2 options:
1) Git solution - create the second repository as submodule in the first repository. then in the "Get Sources" you can check the checkbox checkout submodules
, then Azure DevOps will bring the two repositories into the agent.
2) Azure DevOps solutuin - add a Command Line or a PowerShell task that bring the second repository to the agent with git clone second-repo-url
.
Upvotes: 4