This page last changed on Nov 22, 2004 by mroberts.

CruiseControl.NET provides basic support for Subversion repositories. Checking for changes, running builds (bootstrapped through NAnt), and tagging-by-copying are supported, but more advanced features such as using Subversion revision numbers are not yet supported. Subversion support is under active development and will improve over time.

To configure the CruiseControl.NET server to monitor a Subversion repository, edit ccnet.config and configure sourcecontrol to point at your repository:
<sourcecontrol type="svn">
	<executable>c:\program files\subversion\bin\svn.exe</executable>
	<trunkUrl>svn://svn.mycompany.com/myfirstproject/trunk</trunkUrl>
	<workingDirectory>c:\dev\ccnet</workingDirectory>
</sourcecontrol>

The <executable> tag should contain the full path to your Subversion executable. The <trunkUrl> tag should specify the URL to use to determine if changes have occurred in your repository. Access to svn log for this URL should be available anonymously, because the Subversion client will run without extra authentication priveleges.

Configuration Elements:

Node Description Type Default Required
executable The location of the svn executable string "svn.exe" true
trunkUrl The url for your repository (eg. svn://svnserver/) string N/A true
workingDirectory The directory containing the locally checked out workspace. string N/A true
username The username to use for authentication when connecting to the repository. string N/A false
password The password to use for authentication when connecting to the repository. string N/A false
autoGetSource Whether to retrieve the updates from Subversion for a particular build. bool false false
webUrlBuilder The root url for the WebSVN site string N/A false
tagOnSuccess Indicates that the repository should be tagged if the build succeeds. bool false false
tagBaseUrl The base url for tags in your repository. string false false
timeout How long (in milliseconds) the operation will be permitted to run before timing out int 10 minutes false

Linking modifications to WebSVN

You can link the modifications detected by CruiseControl.NET to the appropriate WebSVN page by adding the following additional configuration information to the Subversion source control section:

<webUrlBuilder type="websvn">
                <url>http://localhost:7899/websvn/diff.php?repname=MiniACE&path={0}&rev={1}&sc=1</url>
</webUrlBuilder>

Change the <url> element to point to the root url for the WebSVN site. The path and rev parameters will be filled in by CruiseControl.NET when it generates the link to the code file page.

NOTE: The standard url for WebSVN 1.38 contains rep=3 r instead of repname=MiniACE. Adding a new repository to the SvnParentPath will change the number of the rep parameter, so you may need to make the following change to diff.php to decode the repname parameter:
$repname = @$_REQUEST["repname"];

if (isset($repname))
{
    $rep = $config->findRepository($repname);
}

External contributors:

  • Matt Petteys

WebSVN's URL format has changed in 1.40. As such, there is no need to make the change to diff.php described above

Tim
Posted by at Jun 10, 2004 06:57
Document generated by Confluence on Jun 26, 2005 17:23