Search code examples
build-definition

Granularity for TFS Build Definition Selection


I don't know much about TFS except that I use it. However, when I build using Pending Changes, our build team has somehow managed to tell TFS that based on what part of the code is being edited, which build definitions are available for you to select.

How do they do this? I can't search for it effectively. And to what granularity can this be extended? There is a single file in a seemingly unrelated section of code that has more implications than expected, so I'd like to restrict check-ins to the file to a wider build definition.


Solution

  • The Build Definition has a set of Source Control Mappings, which define which folders the build needs when it is triggered. This same set of folders is used by Team Build to make an educated guess whether a build should be shown. If your pending change falls outside of the Source Control Mappings, the build won't be listed.

    See: Specify build triggers and reasons

    If you define a build with the Continuous Integration trigger, the build is queued every time that a team member checks in a change. The build definition Workspace determines which files trigger the build definition. For more information about build workspaces, see Work with build workspaces.