|
CruiseControl.NET : Subversion Source Control Block
This page last changed on Nov 19, 2008 by dhommel.
CruiseControl.NET provides basic support for Subversion repositories. Checking for changes, checking out or updating sources, 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"> <trunkUrl>svn://svn.mycompany.com/myfirstproject/trunk</trunkUrl> <workingDirectory>c:\dev\ccnet</workingDirectory> </sourcecontrol> The <trunkUrl> tag should specify the URL to use to determine if changes have occurred in your repository. You need to make sure your SVN client settings are such that all authentication is automated. Typically you can do this by using anonymous access or appropriate SSH setups if using SVN over SSH. Configuration Elements:
Linking modifications to WebSVNYou 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); } The WebSVN WebUrlBuilder can also be used to connect to a ViewCV site. Here is an example used by CCNet to link to the file revision pages on SourceForge. <webUrlBuilder type="websvn"> <url>http://svn.sourceforge.net/viewvc/ccnet/{0}?view=markup&pathrev={1}</url> </webUrlBuilder> SVN over SSLWhen connecting to a Subversion repository via SSL (https), you may be required to accept an issued server certificate. This generally requires responding to a command-line prompt that the certificate should be accepted permanently. For CruiseControl.NET, all Subversion commands are executed using the --non-interactive switch, which will cause this prompt to be skipped and the subsequent Subversion command to fail with a message like this: svn: PROPFIND request failed on '/svnroot/ccnet'
svn: PROPFIND of '/svnroot/ccnet': Server certificate verification failed: issuer is not trusted (https://ccnet.svn.sourceforge.net)
As the failure will happen on the first Subversion command to be executed, this failure will not show up as a broken build, but will instead show up in the server log. One way to resolve this problem is to execute a command against the Subversion repository from the command-line logged in as the user that you are using to run CCNet (certificates are cached by user account, so you must accept the certificate for the appropriate user). For example, try executing the following command (where trunk_url is the svn url for your repository): svn list [trunk_url] When prompted to accept the certificate, type 'P' to permanently accept it. If you are running CCService under the LocalSystem account, you will need to accept the certificate for this user. Check out the CCService page for information about how to diagnose problems as the LocalSystem account. External contributors:
SVN over svn+sshTo connect to Subversion with the svn+ssh protocol, here is an excerpt from the article HowTo: Configure SVN+SSH with Subclipse on Windows by Martin Woodward. For more details, see the complete article. HowTo: Configure SVN+SSH with Subclipse on Windows Solution:
Known IssuesCruiseControl.NET doesn't see my changesThe Subversion interface depends on the clocks of the CruiseControl.Net and Subversion servers being set within a small difference. Due to a long-standing Subversion bug (Bugzilla #1642) that appears unlikely to ever be fixed, CruiseControl.Net must filter the list of modifications returned by Subversion, looking for only those that fall within a specific time range. When the clocks of the two servers are significantly different, the filter may ignore modifications that should not be ignored. To prevent this problem, keep the clocks of the two servers set as closely together as possible. Dashboard Localization (issues with SVN)I've found that svn has a trouble with --xml parameter. My russian Log Messages were not readable. <xsl:value-of select="translate(comment,'??????????????????????????????????????????????????????????????????','????????????????????????????????????????????????????????????????')"/>
where comment from /cruisecontrol/modifications/modification, and "??" in second parameter are symbols to delete, all others are mathed with third parameters. As I found xsl could only translate char strings |
| Document generated by Confluence on Mar 14, 2009 02:55 |