tags:

views:

313

answers:

1

If you follow some of MS's recommended branching strategies you can easily end up with a project structure such as:

$PROJECT\
    DEV\
     MyProject
    STAGE\
     MyProject
    PROD\
     MyProject

Now let's say I have three different build definitions. One each for DEV, STAGE, and PROD. This should be common considering that the build definition will define the exact solutions to build.

If I turn on CI for each of them, STAGE will be built even though the checkin occurred in DEV...

Now my question. How can I limit the build definition to execute only when a check in occurs in either a path or a solution that is part of the build definition?

+1  A: 

When defining the working folder configuration screen - only have it start at the root of the branch you want to build.

For example, your DEV branch would be configured so that $/TEAMPROJECT/DEV/MyProject was mapped to $(SourceDir) rather than the default mapping which would have been set to just $/TEAMROJECT.

FYI - Personally, I only have CI Builds on Dev branches and queue manual builds for a push to QA. I also normally don't do a re-build for production but just push the build binaries that were QA'd. I also keep by build configuration folder inside the branch i.e. $/TEAMPROJECT/DEV/TeamBuild rather than the default $/TEAMPROJECT/TeamBuildTypes and therefore changes to the build configuration are also pushed up through the branches. That said, you have to stick with the default if you wanted the build configuration to be visible to VS2005 clients.

Hope that helps,

Martin.

Martin Woodward
Perfect. Thanks. In reality, we also have several other loosely coupled studio projects in the DEV branch that don't need to have their CI kicked off. That said, using the mapping method has worked perfectly.
Chris Lively
If the source of those loosely coupled projects in the DEV branch are not required to perform the build, then you might want to look at adding a new cloaked working folder mapping for them. Cloaking a sub-folder in the workspace means that it does not trigger the build (and is not downloaded)
Martin Woodward
But what if I want their CI to be kicked off when changes occur in their specific directories?
Chris Lively