views:

560

answers:

4

Hi all.

I searched a lot but i didn't find a solution for my problem.

I use CruiseControl.NET (1.4.4). My project (in ccnet.config) load a repository from a cvs server to a local repository, and launch some executables (msbuild, NUnit...).

I use a trigger (Interval or Schedule Trigger), that launch regularly my project. But if my project has not been modified, it always launch all next tasks. And I would like to avoid it. So i want to launch my project only if a commit has been detected.

Is there any solution for it please?

Thanks

Olivier

A: 
Anders Juul
+1  A: 

Your trigger needs to specify IfModificationExists:

<intervalTrigger 
    name = "dave" 
    seconds = "30"   
    buildCondition = "IfModificationExists" />

Although buildCondition="IfModificationExists" is the default anyway, so as long as its not set to ForceBuild you should be fine.

EDIT:

The URL Trigger might be of some use to you. You can set your svn server to modify a page on commmit and the CC.Net checks the page to see if it has changed, thus not getting all the files.

Pondidum
Thanks for your help Andy, I will study this URL Trigger.
A: 

Just use IntervalTrigger, like this:

<triggers>
 <intervalTrigger />
</triggers>

You can also add an modificationDelaySeconds, to wait for a number of seconds before starting the build after the last commit.

    <modificationDelaySeconds>30</modificationDelaySeconds>
Jochen
A: 

Thank you Anders Juul abd Andy for your quick answers.

By using the intervalTrigger with "IfModificationExists" build condition, the project must be loaded each time (it's logical ^^). But my project size is about 450Mo. So it's a little long. So my last question is : can we execute all builds and next tasks when a commit command has been detected? (without loading all files, in CruiseControl). I use TortoiseCVS (version 1.10.10). Maybe we can force CruiseControl project to be lauched after a commit?

you should edit your question rather than posting an 'answer'. I am editing my post to answer this
Pondidum
Olivier, first of all, when asking these kinds of questions, always add your existing configuration to the question, so that the rest of us can understand what you're asking. Secondly, CC.NET doesn't "load" your project - it just updates the working copy of your source repository. So 450 MB will be downloaded only once and then only the modification will be downloaded. And causing the build after commit is the standard way of doing continuous integration builds - and CC.NET by default works exactly in this scenario.
Igor Brejc
Ok Igor. Thanks. I note all yours explications for the next time!