This page last changed on Mar 10, 2009 by csut017.

Outside of writing your build scripts to support Continuous Integration, your main configuration task in getting an instance of CruiseControl.NET running for your project is editting the Server's configuration file.

This is defined in an XML file which by default is called ccnet.config in the same directory as the server application. By default, the server watches this file for updates and reloads it if the file changes.
You can Configure CruiseControl.Net to Automatically Update its Config File. See The Server Console Application for more details on how to use an alternative config file name or to disable automatic reloading.

You can verify that you have a valid configuration without actually running the CruiseControl.Net server. See the -validate option in The Server Console Application or the CCValidator tool for details.

The configuration file forms a tree of constructs, starting at the root element. The documentation for the rest of this section is reference documentation for each of the types of constructs you can use.






Once you've configured your server, you should have a file that looks something like this:
<cruisecontrol>
  <queue name="Q1" duplicates="ApplyForceBuildsReplace"/>
  <project name="MyProject" queue="Q1" queuePriority="1">
    <webURL>http://mybuildserver/ccnet/</webURL>
    <workingDirectory>C:\Integration\MyProject\WorkingDirectory</workingDirectory>
    <artifactDirectory>C:\Integration\MyProject\Artifacts</artifactDirectory>
    <modificationDelaySeconds>10</modificationDelaySeconds>

    <triggers>
      <intervalTrigger seconds="60" name="continuous" />
    </triggers>

    <sourcecontrol type="cvs">
      <executable>c:\putty\cvswithplinkrsh.bat</executable>
      <workingDirectory>c:\fromcvs\myrepo</workingDirectory>
      <cvsroot>:ext:mycvsserver:/cvsroot/myrepo</cvsroot>
    </sourcecontrol>

    <prebuild>
         <nant>
            <executable>c:\fromcvs\myrepo\myproject\tools\nant\nant.exe</executable>
            <baseDirectory>c:\fromcvs\myrepo\myproject</baseDirectory>
            <buildFile>cruise.build</buildFile>
            <targetList>
                <target>cleanup</target>
            </targetList>
            <buildTimeoutSeconds>300</buildTimeoutSeconds>
         </nant>
    </prebuild>

    <tasks>
      <nant>
        <executable>c:\fromcvs\myrepo\myproject\tools\nant\nant.exe</executable>
        <baseDirectory>c:\fromcvs\myrepo\myproject</baseDirectory>
        <buildArgs>-D:cvs.executable=c:\putty\cvswithplinkrsh.bat</buildArgs>
        <buildFile>cruise.build</buildFile>
        <targetList>
          <target>run</target>
        </targetList>
        <buildTimeoutSeconds>300</buildTimeoutSeconds>
      </nant>
    </tasks>

    <publishers>
      <merge>
        <files>
          <file>c:\fromcvs\myrepo\myproject\build\test\unit-test-results.xml</file>
        </files>
      </merge>
      <xmllogger />
      <statistics />
      <modificationHistory  onlyLogWhenChangesFound="true" />
    </publishers>

  </project>

  <project name="myOtherProject">
    <!-- Details for another project can go here -->
  </project>
</cruisecontrol>





This example is merely a guide. Refer to the reference documentation for exact configuration options.

Example Configuration Files

When you install CruiseControl.NET, you can find an examples folder in the installation directory. This folder contains a number of example ccnet.config files that you can use to get you started.

Document generated by Confluence on Mar 14, 2009 02:55