|
CruiseControl.NET : Configuring the Server
This page last changed on Apr 18, 2010 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 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. XML NamespaceThe namespace for the CruiseControl.NET XML is http://thoughtworks.org/ccnet/1/5 (for version 1.5.) There is an XSD available that can be used for Intellisense in XML editors (this is part of the standard install for CruiseControl.NET.) If the namespace is omitted a warning message will be displayed saying CruiseControl.NET cannot determine the version of the configuration. Configuration ElementsThe 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.
Example ConfigurationOnce you've configured your server, you should have a file that looks something like this: <cruisecontrol xmlns="http://thoughtworks.org/ccnet/1/5"> <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> Version NumbersEach version of CruiseControl.NET has slightly different configuration options. When CruiseControl.NET starts up it will check the version number in the configuration file against the version of the server running. If there is a version mismatch a warning will be added to the log. The version number is set in the namespace for the XML (http://thoughtworks.org/ccnet/1/5) where 1/5 maps to version 1.5. Note This was added in version 1.5 Example Configuration FilesWhen 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 Jan 23, 2011 08:52 |