I’m diving into CI and am setting up a CI system for the first time at home. I’m going to document the setup as I go, mostly for myself, but maybe it will help someone else that wants to set up a CI system for the first time. Assuming this all works:
| CI Server | CCNet v1.4.4.83 |
| Source Control | VisualSVN (subversion) |
| Build Script | NAnt |
| Tests | Tests |
| Other | CI Factory v1.0.1.5 |
| CCNet Build Station v1.0 |
My goal is to get a minimal CI system up and running. The system should get changes from source control when changes are committed, build the project, execute any tests and report the results. This installation will be configured for a single project. I’ll look to get more sophisticated as necessary once the basics are up and running. The most likely next step will be configuring for multiple projects.
I have a very basic setup at home. A desktop with Windows XP that is running VisualSVN and a laptop, also Windows XP that I do my work on and that will run the CI system.
So let’s get started.
Install VisualSVN
I have had VisualSVN running for some time now. As I recall the installation is well documented and very easy so I’m not going to go through the steps here.
Install CCNet
I used the zip file installation. Create a folder for the CC.Net files and copy the contents of the CruiseControl zip file. I’ll refer to that folder as CC_Home.
After the Cruise Control files are copied to CC_Home you’ll need to configure the server (see CCNet Quick Start). Find the file CC_Home\server\ccnet.config and open with your favorite XML editor.
- Configure the project element with the details of the project you’re configuring.
- Set project name:
<project name="TwentySevenQ"> ... </project>
. The following elements are children of <project>
- Set the project working directory. This is where the checked out versions of the project files.
<workingDirectory>{your projects root}\TwentySevenQ</workingDirectory> - Set the artifact directory. This is where artifacts of the build process will be created. Things like assemblies, build logs, etc. It’s like the folder you’d specify if you published your project from Visual Studio.
<artifactDirectory>{your projects root}\TwentySevenQ\publish</artifactDirectory>
Create a Windows service to automatically start the CI server. As an alternative you can create a short cut to only start the server when you’re working and need it.
Install CCNet Build Station
I don’t have a running version of IIS at home so can not run the CC.Net Web Dashboard. For that reason I use CCNet Build Station found on Codeplex. From the project description:
The CCNet Build Station is a Windows Forms application that runs the CruiseControl.NET Continuous Integration Build Server without installation and without depending on IIS by using a provided version of the Cassini web server. Ideal for providing a local build server