1
votes

In TFS 2013, is there any way to create a custom build workflow (via a custom .xaml file) which uses source from both a TFS-Git project and TFVC project?

When creating a Build Def in a Git project, the Source Settings tab only allows selection of a single Git repo.

When creating a Build Def in a TFVC project, the Source Settings tab allows several paths from any TFVC projects.

What I need is a way to combine the above functionalities into a single build definition. Is this possible? If yes, how?

My only requirement is that it must be a Git based Build Definition, so ideally I need a TFS Activity which allows me to pass in multiple TFVC paths and copy them to the build folder. But I'll take any suggestions.

Thanks in advance!!

2

2 Answers

0
votes

No, that's not possible to combine TFS-VC and TFS-Git in a single build definition. Microsoft made these 2 things very separated.

But, you could use a pre-build script (in the Gittemplate12.xaml template) to run a git-tfs quick-clone and then clone your TFS-VC path ($/collection) inside a sub-folder. I have just tested and it works, you can clone with git-tfs indside an existing git repository...

0
votes

Ultimately, I created a new Git TeamProject and set up some triggered automation to keep the TFS project and Git project in sync.

The automation is a simple git-tf pull from the TFS project followed by a git push to the Git project.

My custom build workflow pulls in the new Git project's repos as submodules and uses them accordingly.