Thursday, 1 May 2008
CruiseControl.Net
I'm working with CruiseControl.net this week. First time I've worked with the product and I'm finding a couple of issues (that are all my mistakes) but that aren't particularly well documented. So this is as much for my benefit as anything else.
Firstly, last night after editing the config file I couldn't get the build to run. Now, there are several config files. in c:\Program Files\CruiseControl.NET\server, the main one is the ccnet.config file, this is the default location for this file, that location can be changed, to do that you'd edit the ccservice.exe.config file.
The ccservice.exe.config file is re-read when the CCNet service is (re)started, as is the ccnet.config file. When you edit the ccnet.config file it appears that the service does re-read the file, however, if the file is invalid the service ignores it, and doesn't appear to log this fact anywhere. Re-starting the service will force a re-read of the config file and then log an error if the file is invalid.
I was changing a CCNet config file to do multiple checkouts, after a bit of trial and error the source control section of the file ended up looking like this
<sourcecontrol type="multi">
<sourceControls autoGetSource="true" applyLabel="true">
<vsts autoGetSource="true" >
<server>http://server:8080</server>
<project>$/FOO/SharedUILibraries</project>
<username>user</username>
<password>user</password>
<domain>nt</domain>
<workingDirectory>
C:\...\FOO\SharedUILibraries
</workingDirectory>
<cleanCopy>true</cleanCopy>
<workspace>WS_MINE</workspace>
<deleteWorkspace>true</deleteWorkspace>
</vsts>
<vsts autoGetSource="true" >
<server>http://server:8080</server>
<project>$/FOO/SharedEnterpriseLibrary</project>
<username>user</username>
<password>user</password>
<domain>nt</domain>
<workingDirectory>
C:\...\SharedEnterpriseLibrary
</workingDirectory>
<cleanCopy>true</cleanCopy>
<workspace>WS_MINE</workspace>
<deleteWorkspace>true</deleteWorkspace>
</vsts>
<vsts autoGetSource="true" >
<server>http://server:8080</server>
<project>$/FOO/WD</project>
<username>user</username>
<password>user</password>
<domain>nt</domain>
<workingDirectory>
C:\...\FOO\WD
</workingDirectory>
<cleanCopy>true</cleanCopy>
<workspace>WS_MINE</workspace>
<deleteWorkspace>true</deleteWorkspace>
</vsts>
</sourceControls>
</sourcecontrol>
And this worked, however there was one gotcha.
Before getting this to a working stage I was getting a status in the CCNet dashboard of CheckingModifications, whatever I did I'd get this status, even forcing a build wouldn't change it. It turned out the reason for this was that I had put the wrong name in the project element. This meant that CCNet was trying to look for bits that didn't exist, and sat there spinning its wheels. Once corrected everything worked fine.
So if you get the CheckingModifications status, check that your source control settings are correct and that you can do a checkout
Posted by at 7:09 AM in Net
.