Files
2025-09-29 00:52:08 +02:00

122 lines
16 KiB
HTML
Executable File

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>CruiseControl.NET : Configuring the Server</title>
<link rel="stylesheet" href="styles/site.css" type="text/css" />
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
<tr>
<td valign="top" class="pagebody">
<div class="pageheader">
<span class="pagetitle">
CruiseControl.NET : Configuring the Server
</span>
</div>
<div class="pagesubheading">
This page last changed on Mar 10, 2009 by <font color="#0050B2">csut017</font>.
</div>
<p>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.</p>
<p>This is defined in an XML file which by default is called <tt>ccnet.config</tt> in the same directory as the server application. By default, the server watches this file for updates and reloads it if the file changes.<br/>
You can <a href="Configure CruiseControl.Net to Automatically Update its Config File.html" title="Configure CruiseControl.Net to Automatically Update its Config File">Configure CruiseControl.Net to Automatically Update its Config File</a>. <em>See</em> <em><a href="The Server Console Application.html" title="The Server Console Application">The Server Console Application</a></em> <em>for more details on how to use an alternative config file name or to disable automatic reloading</em>.</p>
<p>You can verify that you have a valid configuration without actually running the CruiseControl.Net server. See the <b>&#45;validate</b> option in <em><a href="The Server Console Application.html" title="The Server Console Application">The Server Console Application</a></em> or the <em><a href="CCValidator.html" title="CCValidator">CCValidator</a></em> tool for details.</p>
<p>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.
<br clear="all" />
<ul><li><a href="CCValidator.html" title="CCValidator">CCValidator</a></li><li><a href="Configuration Preprocessor.html" title="Configuration Preprocessor">Configuration Preprocessor</a></li><li><a href="Configure CruiseControl.Net to Automatically Update its Config File.html" title="Configure CruiseControl.Net to Automatically Update its Config File">Configure CruiseControl.Net to Automatically Update its Config File</a></li><li><a href="IssueUrlBuilder.html" title="IssueUrlBuilder">IssueUrlBuilder</a></li><li><a href="Queue Configuration.html" title="Queue Configuration">Queue Configuration</a></li><li><a href="The CruiseControl Configuration Block.html" title="The CruiseControl Configuration Block">The CruiseControl Configuration Block</a><ul><li><a href="Project Configuration Block.html" title="Project Configuration Block">Project Configuration Block</a><ul><li><a href="ExternalLinks.html" title="ExternalLinks">ExternalLinks</a></li><li><a href="Labeller Blocks.html" title="Labeller Blocks">Labeller Blocks</a><ul><li><a href="Date Labeller.html" title="Date Labeller">Date Labeller</a></li><li><a href="Default Labeller.html" title="Default Labeller">Default Labeller</a></li><li><a href="File Labeller.html" title="File Labeller">File Labeller</a></li><li><a href="Iteration Labeller.html" title="Iteration Labeller">Iteration Labeller</a></li><li><a href="Last Change Labeller.html" title="Last Change Labeller">Last Change Labeller</a></li><li><a href="Remote Project Labeller.html" title="Remote Project Labeller">Remote Project Labeller</a></li><li><a href="State File Labeller.html" title="State File Labeller">State File Labeller</a></li></ul></li><li><a href="Source Control Blocks.html" title="Source Control Blocks">Source Control Blocks</a><ul><li><a href="AccuRev Source Control Block.html" title="AccuRev Source Control Block">AccuRev Source Control Block</a></li><li><a href="Alienbrain Source Control Block.html" title="Alienbrain Source Control Block">Alienbrain Source Control Block</a></li><li><a href="BitKeeper Source Control Block.html" title="BitKeeper Source Control Block">BitKeeper Source Control Block</a></li><li><a href="CVS Source Control Block.html" title="CVS Source Control Block">CVS Source Control Block</a></li><li><a href="External Source Control.html" title="External Source Control">External Source Control</a></li><li><a href="Filesystem Source Control Block.html" title="Filesystem Source Control Block">Filesystem Source Control Block</a></li><li><a href="Filtered Source Control Block.html" title="Filtered Source Control Block">Filtered Source Control Block</a></li><li><a href="MKS Source Integrity Source Control Block.html" title="MKS Source Integrity Source Control Block">MKS Source Integrity Source Control Block</a></li><li><a href="Multi Source Control Block.html" title="Multi Source Control Block">Multi Source Control Block</a></li><li><a href="Null Source Control Block.html" title="Null Source Control Block">Null Source Control Block</a></li><li><a href="Perforce Source Control Block.html" title="Perforce Source Control Block">Perforce Source Control Block</a></li><li><a href="PlasticSCM Source Control Block.html" title="PlasticSCM Source Control Block">PlasticSCM Source Control Block</a></li><li><a href="PVCS Source Control Block.html" title="PVCS Source Control Block">PVCS Source Control Block</a></li><li><a href="Rational ClearCase Source Control Block.html" title="Rational ClearCase Source Control Block">Rational ClearCase Source Control Block</a></li><li><a href="Seapine Surround Source Control Block.html" title="Seapine Surround Source Control Block">Seapine Surround Source Control Block</a></li><li><a href="SourceAnywhere Standalone Source Control Block.html" title="SourceAnywhere Standalone Source Control Block">SourceAnywhere Standalone Source Control Block</a></li><li><a href="SourceGear Vault Source Control Block.html" title="SourceGear Vault Source Control Block">SourceGear Vault Source Control Block</a></li><li><a href="StarTeam Source Control Block.html" title="StarTeam Source Control Block">StarTeam Source Control Block</a></li><li><a href="Subversion Source Control Block.html" title="Subversion Source Control Block">Subversion Source Control Block</a></li><li><a href="Telelogic Synergy.html" title="Telelogic Synergy">Telelogic Synergy</a></li><li><a href="Visual Source Safe Source Control Block.html" title="Visual Source Safe Source Control Block">Visual Source Safe Source Control Block</a></li><li><a href="Visual Studio Team Foundation Server Plugin.html" title="Visual Studio Team Foundation Server Plugin">Visual Studio Team Foundation Server Plugin</a></li></ul></li><li><a href="State Manager Blocks.html" title="State Manager Blocks">State Manager Blocks</a><ul><li><a href="File State Manager.html" title="File State Manager">File State Manager</a></li></ul></li><li><a href="Task Blocks.html" title="Task Blocks">Task Blocks</a><ul><li><a href="Artifact Cleanup Publisher.html" title="Artifact Cleanup Publisher">Artifact Cleanup Publisher</a></li><li><a href="Build Publisher.html" title="Build Publisher">Build Publisher</a></li><li><a href="Email Publisher.html" title="Email Publisher">Email Publisher</a></li><li><a href="Executable Task.html" title="Executable Task">Executable Task</a></li><li><a href="File Merge Task.html" title="File Merge Task">File Merge Task</a></li><li><a href="FinalBuilder Task.html" title="FinalBuilder Task">FinalBuilder Task</a></li><li><a href="ForceBuildPublisher.html" title="ForceBuildPublisher">ForceBuildPublisher</a></li><li><a href="Gendarme Task.html" title="Gendarme Task">Gendarme Task</a></li><li><a href="Modification Reader Task.html" title="Modification Reader Task">Modification Reader Task</a></li><li><a href="Modification Writer Task.html" title="Modification Writer Task">Modification Writer Task</a></li><li><a href="ModificationHistory Publisher.html" title="ModificationHistory Publisher">ModificationHistory Publisher</a></li><li><a href="MsBuild Task.html" title="MsBuild Task">MsBuild Task</a></li><li><a href="NAnt Task.html" title="NAnt Task">NAnt Task</a></li><li><a href="Null Task.html" title="Null Task">Null Task</a></li><li><a href="NUnit Task.html" title="NUnit Task">NUnit Task</a></li><li><a href="Rake Task.html" title="Rake Task">Rake Task</a></li><li><a href="RSS Publisher.html" title="RSS Publisher">RSS Publisher</a></li><li><a href="Statistics Publisher.html" title="Statistics Publisher">Statistics Publisher</a></li><li><a href="Visual Studio Task.html" title="Visual Studio Task">Visual Studio Task</a></li><li><a href="Xml Log Publisher.html" title="Xml Log Publisher">Xml Log Publisher</a></li></ul></li><li><a href="Timeout Configuration.html" title="Timeout Configuration">Timeout Configuration</a></li><li><a href="Trigger Blocks.html" title="Trigger Blocks">Trigger Blocks</a><ul><li><a href="Filter Trigger.html" title="Filter Trigger">Filter Trigger</a></li><li><a href="Interval Trigger.html" title="Interval Trigger">Interval Trigger</a></li><li><a href="Multiple Trigger.html" title="Multiple Trigger">Multiple Trigger</a></li><li><a href="Project Trigger.html" title="Project Trigger">Project Trigger</a></li><li><a href="Schedule Trigger.html" title="Schedule Trigger">Schedule Trigger</a></li><li><a href="Url Trigger.html" title="Url Trigger">Url Trigger</a></li></ul></li></ul></li></ul></li></ul><br clear="all" />
<br clear="all" />
<br clear="all" />
<br clear="all" />
<br clear="all" />
Once you've configured your server, you should have a file that looks something like this:<br/>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml"><span class="code-tag">&lt;cruisecontrol&gt;</span>
<span class="code-tag">&lt;queue name=<span class="code-quote">"Q1"</span> duplicates=<span class="code-quote">"ApplyForceBuildsReplace"</span>/&gt;</span>
<span class="code-tag">&lt;project name=<span class="code-quote">"MyProject"</span> queue=<span class="code-quote">"Q1"</span> queuePriority=<span class="code-quote">"1"</span>&gt;</span>
<span class="code-tag">&lt;webURL&gt;</span>http://mybuildserver/ccnet/<span class="code-tag">&lt;/webURL&gt;</span>
<span class="code-tag">&lt;workingDirectory&gt;</span>C:\Integration\MyProject\WorkingDirectory<span class="code-tag">&lt;/workingDirectory&gt;</span>
<span class="code-tag">&lt;artifactDirectory&gt;</span>C:\Integration\MyProject\Artifacts<span class="code-tag">&lt;/artifactDirectory&gt;</span>
<span class="code-tag">&lt;modificationDelaySeconds&gt;</span>10<span class="code-tag">&lt;/modificationDelaySeconds&gt;</span>
<span class="code-tag">&lt;triggers&gt;</span>
<span class="code-tag">&lt;intervalTrigger seconds=<span class="code-quote">"60"</span> name=<span class="code-quote">"continuous"</span> /&gt;</span>
<span class="code-tag">&lt;/triggers&gt;</span>
<span class="code-tag">&lt;sourcecontrol type=<span class="code-quote">"cvs"</span>&gt;</span>
<span class="code-tag">&lt;executable&gt;</span>c:\putty\cvswithplinkrsh.bat<span class="code-tag">&lt;/executable&gt;</span>
<span class="code-tag">&lt;workingDirectory&gt;</span>c:\fromcvs\myrepo<span class="code-tag">&lt;/workingDirectory&gt;</span>
<span class="code-tag">&lt;cvsroot&gt;</span>:ext:mycvsserver:/cvsroot/myrepo<span class="code-tag">&lt;/cvsroot&gt;</span>
<span class="code-tag">&lt;/sourcecontrol&gt;</span>
<span class="code-tag">&lt;prebuild&gt;</span>
<span class="code-tag">&lt;nant&gt;</span>
<span class="code-tag">&lt;executable&gt;</span>c:\fromcvs\myrepo\myproject\tools\nant\nant.exe<span class="code-tag">&lt;/executable&gt;</span>
<span class="code-tag">&lt;baseDirectory&gt;</span>c:\fromcvs\myrepo\myproject<span class="code-tag">&lt;/baseDirectory&gt;</span>
<span class="code-tag">&lt;buildFile&gt;</span>cruise.build<span class="code-tag">&lt;/buildFile&gt;</span>
<span class="code-tag">&lt;targetList&gt;</span>
<span class="code-tag">&lt;target&gt;</span>cleanup<span class="code-tag">&lt;/target&gt;</span>
<span class="code-tag">&lt;/targetList&gt;</span>
<span class="code-tag">&lt;buildTimeoutSeconds&gt;</span>300<span class="code-tag">&lt;/buildTimeoutSeconds&gt;</span>
<span class="code-tag">&lt;/nant&gt;</span>
<span class="code-tag">&lt;/prebuild&gt;</span>
<span class="code-tag">&lt;tasks&gt;</span>
<span class="code-tag">&lt;nant&gt;</span>
<span class="code-tag">&lt;executable&gt;</span>c:\fromcvs\myrepo\myproject\tools\nant\nant.exe<span class="code-tag">&lt;/executable&gt;</span>
<span class="code-tag">&lt;baseDirectory&gt;</span>c:\fromcvs\myrepo\myproject<span class="code-tag">&lt;/baseDirectory&gt;</span>
<span class="code-tag">&lt;buildArgs&gt;</span>-D:cvs.executable=c:\putty\cvswithplinkrsh.bat<span class="code-tag">&lt;/buildArgs&gt;</span>
<span class="code-tag">&lt;buildFile&gt;</span>cruise.build<span class="code-tag">&lt;/buildFile&gt;</span>
<span class="code-tag">&lt;targetList&gt;</span>
<span class="code-tag">&lt;target&gt;</span>run<span class="code-tag">&lt;/target&gt;</span>
<span class="code-tag">&lt;/targetList&gt;</span>
<span class="code-tag">&lt;buildTimeoutSeconds&gt;</span>300<span class="code-tag">&lt;/buildTimeoutSeconds&gt;</span>
<span class="code-tag">&lt;/nant&gt;</span>
<span class="code-tag">&lt;/tasks&gt;</span>
<span class="code-tag">&lt;publishers&gt;</span>
<span class="code-tag">&lt;merge&gt;</span>
<span class="code-tag">&lt;files&gt;</span>
<span class="code-tag">&lt;file&gt;</span>c:\fromcvs\myrepo\myproject\build\test\unit-test-results.xml<span class="code-tag">&lt;/file&gt;</span>
<span class="code-tag">&lt;/files&gt;</span>
<span class="code-tag">&lt;/merge&gt;</span>
<span class="code-tag">&lt;xmllogger /&gt;</span>
<span class="code-tag">&lt;statistics /&gt;</span>
<span class="code-tag">&lt;modificationHistory onlyLogWhenChangesFound=<span class="code-quote">"true"</span> /&gt;</span>
<span class="code-tag">&lt;/publishers&gt;</span>
<span class="code-tag">&lt;/project&gt;</span>
<span class="code-tag">&lt;project name=<span class="code-quote">"myOtherProject"</span>&gt;</span>
<span class="code-tag"><span class="code-comment">&lt;!-- Details for another project can go here --&gt;</span></span>
<span class="code-tag">&lt;/project&gt;</span>
<span class="code-tag">&lt;/cruisecontrol&gt;</span></pre>
</div></div><br clear="all" />
<br clear="all" />
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img class="emoticon" src="images/icons/emoticons/warning.gif" height="16" width="16" align="absmiddle" alt="" border="0"/> This example is merely a guide. Refer to the reference documentation for exact configuration options.
<br clear="all" />
<br clear="all" /></p>
<h3><a name="ConfiguringtheServer-ExampleConfigurationFiles"></a>Example Configuration Files</h3>
<p>When you install CruiseControl.NET, you can find an <b>examples</b> folder in the installation directory. This folder contains a number of example ccnet.config files that you can use to get you started.</p>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td height="12" background="http://confluence.public.thoughtworks.org//images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
</tr>
<tr>
<td align="center"><font color="grey">Document generated by Confluence on Mar 14, 2009 02:55</font></td>
</tr>
</table>
</body>
</html>