tfs-2015tfvcbuild-definition

How to manually choose Source Branch for a Build definition using TFVC in TFS?


In TFS 2015 I have the following structure for a Project:

ProjectA

Now let's say I have a build definition for SystemA with the following mappings:

  1. $/ProjectA/SystemA/trunk/src
  2. $/ProjectA/SystemA/trunk/deploy

When I build SystemA the source branch will be:

$/ProjectA/SystemA/trunk

I will be able to see the changeset for the build only for SystemA (what I expect).

Now let's say I want to add a powershell script to my build definition in the Scripts folder. Here are the new mappings for SystemA's build definition:

  1. $/ProjectA/SystemA/trunk/src
  2. $/ProjectA/SystemA/trunk/deploy
  3. $/ProjectA/Scripts

When I build again SystemA, the following source branch will be:

$/ProjectA

The problem now is when I click a build done and troubleshoot the errors why the build failed, I have all the changesets from SystemA, SystemB, SystemC and Scripts.

I would like to manually set the Source Branch for the changesets to $/ProjectA/SystemA/trunk/, even if Scripts is outside of that scope and being used. Is there any way to do that?


Solution

  • We are not able to change the Source Branch, it capture the same part in all mappings. You could consider create the Scripts folder under $/ProjectA/SystemA.