views:

489

answers:

3

I am creating an integration server for the first time, and although I have two projects in my cruisecontrol config file, only the first one seems to be executing. My config file is pasted below.

<cruisecontrol>

    <project name="cc-config">
     <triggers>
      <intervalTrigger seconds="60" />
     </triggers>
     <sourcecontrol type="svn">
      <trunkUrl></trunkUrl>
      <workingDirectory>C:\Program Files (x86)\CruiseControl.NET\server\config</workingDirectory>
     </sourcecontrol>
    </project>

    <project name="stable_trunk">
     <workingDirectoy>C:\working</workingDirectory>
     <artifactDirectory>C:\artifact</artifactDirectory>
     <triggers>
      <intervalTrigger name="continuous" seconds="60"/>
     </triggers>
     <sourcecontrol type="svn">
      <trunkUrl></trunkUrl>
      <workingDirectory>C:\projects\security\trunk</workingDirectory>
     </sourcecontrol>
     <tasks>
      <nant>
       <executable>C:\projects\security\trunk\tools\nant-0.86-nightly-2008-08-18\bin\nant.exe</executable>
       <buildFile>C:\projects\security\trunk\security.build</buildFile>
      </nant>
     </tasks>
     <externalLinks>
      <externalLink name="proj" url="projURL">
     </externalLinks>
    </project>

</cruisecontrol>

Can anybody help me? thanks Carter

Additional Information:

  • The log file has no errors and no mention of the second project
  • The web interface only shows the first project

It's as if the second project doesn't even exist.

The problem was a typo, and I missed the error in the log file. The WorkingDirectory tag was missing the last 'r'.

+1  A: 
  1. Have you checked your CCNet build logs for any anomalies? (Edit Answer: Yes, and there weren't any.)

  2. Logging into the CCNet web server, does the second project show up as a valid project? (Edit Answer: No, it does not.)

  3. If so, can you do a force build on it? (Edit Answer: No, because it doesn't show up.)

So because of those answers, my next suggestion would be to start your cc server from the command line (rather than through the service) just to see if any messages come up.

This is surprising, because generally when my CCNet config file has an error in it, the server crashes (quite hard), and always lets me know there's an issue. I'm really surprised you could be adding a project that isn't showing up or crashing the server.

What you might try, is to go the simple route, and just add a 3rd, empty project and see if you can get /that/ to show up in your list. Also, you could try inserting a deliberate typo that you know will make it crash, and see if you can get that to show up. My concern is that you may be editing the wrong config file, or somehow CCNet isn't actually seeing the changes that you're making to it (source control sync issue?).

HanClinto
A: 

Interval triggers have a default buildCondition of IfModificationExists, which means that a build will only be kicked off if a modication has been detected within your Source Control Block.

from ccnet's docs on the buildCondition attribute

The condition that should be used to launch the integration. By default, this value is IfModificationExists, meaning that an integration will only be triggered if modifications have been detected. Set this attribute to ForceBuild in order to ensure that a build should be launched regardless of whether new modifications are detected. Use Source Control Blocks to specify what to watch for modifications.

Therefore, if one is wanting a build to always be kicked off, regardless of whether modifications occurred in the source control, then one would need to specify ForceBuild for the buildCondition attribute. For example:

<triggers>
    <intervalTrigger name="continuous" buildCondition="ForceBuild" seconds="60"/>
</triggers>
Scott Saad
A: 

Did you get to the bottom of this?

If not then take a look at your log files (?:\Program Files\CruiseControl.NET\server\ccnet.log).

I would recommend using the console app (ccnet.ext) rather than the service at this stage - you can see what is going on a bit easier. Also, before starting the console, ensure that it is set to DEBUG logging by opening the ccnet.exe.config file, locating the log4net tag and setting level value="DEBUG" within it's root.

Start the console and let it run for a few minutes then stop it and look at the logs (post them here if you still have problems).

Hope this helps.

DilbertDave