Looks like TFS supports only one repository per build. It is not enough for me as soon as I need to use some 3rd party libraries stored separately.
I can use GIT submodule for this, but in this case the build will not be associated with commits and work items because it ignores commits from submodules. Besides, a change in submodule will not trigger the build.
Is it possible to define a build with multiple repositories using plugins, extensions or something like that?
As @jessehouwing mentioned there is no way to build multiple GIT repositories by default. @jessehouwing and @Giulio Vian have provided some workarounds here:
Use Nuget or other Package Manager to store the 3rd party libraries, and add a NuGet restore task to restore the libraries.
Add Command Line task to call git.exe to pull the additional repositories.
Create two build definition, in the second build definition, you need to add a powershell task. In the powershell script, you can use TFS REST API to queue the first build definition.
But none of them will associate commits and work items in two repositories with one build. I found there is already a UserVoice at website below, you can vote it:
https://developercommunity.visualstudio.com/idea/365522/allow-tfs-build-to-depend-on-multiple-repositories.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With