Search code examples
.netconfigurationcruisecontrol.net

CruiseControl.Net continues to build even if there's no new source


I'm having a problem with configuring CC.Net. My current setup for the project looks like this (sanitised to get rid of confidential stuff):

<project name="WebApp">
    <workingDirectory>c:\cc\WebApp\Code</workingDirectory>
    <artifactDirectory>c:\cc\WebApp\Artifacts</artifactDirectory>   
    <webURL>http://example.com/ccnet</webURL>
    <modificationDelaySeconds>10</modificationDelaySeconds> 
    <triggers>
      <intervalTrigger seconds="30" name="continuous" />
    </triggers>


<sourcecontrol type="multi">
<sourceControls autogetsource="true">
<svn>
    <trunkUrl>svn+ssh://[email protected]/webapp/trunk</trunkUrl>
    <executable>C:\Program Files\SlikSvn\bin\svn.exe</executable>
    <username>build</username>
    <password>********</password>
    <revisionNumbers>true</revisionNumbers>
</svn>
<svn>
    <trunkUrl>svn+ssh://[email protected]/dataservice/trunk</trunkUrl>
    <executable>C:\Program Files\SlikSvn\bin\svn.exe</executable>
    <username>build</username>
    <password>********</password>
    <revisionNumbers>true</revisionNumbers>
    <workingDirectory>..\dataservice</workingDirectory>
</svn>  
<svn>
    <trunkUrl>svn+ssh://[email protected]/WCFProxyClasses/WCFProxyClasses/trunk</trunkUrl>
    <executable>C:\Program Files\SlikSvn\bin\svn.exe</executable>
    <username>build</username>
    <password>********</password>
    <revisionNumbers>true</revisionNumbers>
    <workingDirectory>..\proxies\WCFProxyClasses</workingDirectory>
</svn>  
</sourceControls>
</sourcecontrol>

    <tasks>
        <msbuild>
            <executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
            <projectFile>WebApp/WebApp.msbuild</projectFile>
            <targets>BeforeBuild;Build;AfterBuild</targets>
            <timeout>300</timeout>
            <logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
        </msbuild>
    </tasks>

    <publishers>
        <rss/>
        <xmllogger />
        <statistics />
        <!-- Email build report to development and QA team -->
        <email from="[email protected]" mailhost="mailhost" mailport="25" includeDetails="TRUE" mailhostUsername="" mailhostPassword="" useSSL="FALSE">
        <users>                 
            <user name="Developer" group="devs" address="[email protected]"/>
        </users>
        <groups>
            <group name="devs"/>
        </groups>
        <converters/>
        <modifierNotificationTypes>
            <NotificationType>Always</NotificationType>
        </modifierNotificationTypes>
        </email>
        <modificationHistory  onlyLogWhenChangesFound="true" />
    </publishers>
</project>

We have multiple source control targets because the web app project is dependant on the others. I'm not sure if this is the cause of the issue (which I'm getting to) or not. I'm have little experience (none!) with CC.Net so I don't really know where to look. The we have other projects in the config file, but none of them have multiple source control targets and they are all behaving as expected.

The problem with this project is that regardless of source control changes, it simple attempts to build every 30 seconds! As far as I understand, the <revisionNumbers> tag is supposed to make CC.Net wait for a new source revision before building again, however it just keeps building and sending out emails, every 30 seconds.

If you need more information I will give it. I'm hoping somebody recognises what's going wrong here or has experienced the problem before and might have some suggestions for me.

Thanks!

EDIT -

If it helps, the project defined above fails to build every time. This is due to certain 3rd party DLLs referenced in the project not being available on the CC.Net server. Could the failed build be causing it to "try again" every 30 seconds?


Solution

  • Try

    • Explicitly mention buildCondition="IfModificationExists" (though it should be the default)...
    • Leave only one source control at a time to find the culprit that keeps triggering the build.
    • Check log (the svn outputs) to see what is being updated (like Pedro offered).

    HTH