Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS build with multiple GIT repositories

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?

like image 873
Eugene Avatar asked Jan 13 '17 09:01

Eugene


1 Answers

As @jessehouwing mentioned there is no way to build multiple GIT repositories by default. @jessehouwing and @Giulio Vian have provided some workarounds here:

  1. Use Nuget or other Package Manager to store the 3rd party libraries, and add a NuGet restore task to restore the libraries.

  2. Add Command Line task to call git.exe to pull the additional repositories.

  3. 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

like image 131
Cece Dong - MSFT Avatar answered Nov 03 '22 20:11

Cece Dong - MSFT