Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS Continuous Integration Build Trigger only one project in a solution

Is there a way to create a build definition, in TFS 2010, that uses continuous integration trigger, and only builds the project who's code changed.

To clarify, what I'm searching for is the following scenario:

1 Solution

x Projects in Solution

1 Build Definition per Project

All Builds are CI triggered

When a check-in occours in a project only that project gets built and tested.

like image 587
Ricardo Gomes Avatar asked Feb 13 '12 10:02

Ricardo Gomes


2 Answers

Place in your build definition's "Items to build" section of the "Process" tab any *.*proj instead of a *.sln.
In the "Workspace" section, select only the source control paths that relate with this project.

like image 157
pantelif Avatar answered Nov 16 '22 07:11

pantelif


In the process tab, set "Clean Workspace" to "None", use "/t:Build" on the "MSBuild Arguments" and properly configure your projects and their dependencies in the solution. This way on each build, you will be getting the latest code, and then building whatever was modified, and anything that depends on it. This is much more dynamic and requires only one build definition. Let the build system operate as it was designed and leverage the optimized build process.

like image 26
user1747452 Avatar answered Nov 16 '22 08:11

user1747452