TFS - Disabling Continuous Integration with NO-CI

by Donn Felker 17. October 2008 01:57

This is kind of a "known thing" to those of us who automate team builds tasks in TFS with build scripts but there are still a lot of people who don't know this... so here we go...

The 2008 version of TFS implemented Continuous Integration. In TFS, a build is triggered upon every check-in (if you have that option enabled in TFS). This can be setup in the build definition as shown below:

 

image

 

When anyone  checks a file into the workspace that is defined within the build (see the "Workspace" area in the image above), TFS will kick off a build.

Sometimes you'll need to automate your build through some custom MSBuild tasks and during that time you may need to check a file back into TFS after a build. Why? Perhaps you're generating some code on the fly, based upon the output of the  build. Perhaps you're generating Xml documentation and you need to drop that back into the source repository for whatever reason. When you check code back into TFS, TFS will kick off a build, quickly leading to an endless loop.

 

How To Get Around This

Place the following into the comment field: ***NO_CI*** You can also use the $(NoCICheckinComment) Property in a build file. This property is set at runtime when MSBuild is started from the TFS Build agent.

The "***NO_CI***" comment will instruct team build to ignore this changeset as a trigger for continuous integration.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

TFS

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Donn Felker

Senior Consultant
MCTS
ScrumMaster
Agile Practitioner

About Me | Books I Recommend

Gotta Pay The Bills


Tag cloud

    Popular Posts

    RecentComments

    Comment RSS

    Calendar

    <<  January 2009  >>
    MoTuWeThFrSaSu
    2930311234
    567891011
    12131415161718
    19202122232425
    2627282930311
    2345678

    View posts in large calendar