This morning I set up my new CruiseControl.Net Implementation for multiple projects. I don’t know if I did it *right*, but the way I did it works and I’ll share that with you.
First, you need to edit ccnet.config for the extra projects. All that entails is setting up another <project> block with the same basic information and a little tweak or two.
What I ended up doing is under the /web folder creating folders for /project1 /project2 and /project3. Then I copied the contents of /web into each of those. This means each project has it’s own log directory. Point the <logDir> element in ccnet.config for each project to its own subfolder (/project1/log). Edit the web.config in each project folder to also reflect the location of this log folder. Don’t forget to change <name> element and the sourcecontrol <project> element as well.
Set up each project folder as a virtual directory in IIS. So now you can go to http://buildmachine/web/project1 for each project.
One other change you need in web.config is to comment out the section in <system.web> that has to do with
<httpModules>
<add type="SiteMesh.Filter.SiteMeshModule, SiteMesh" name="SiteMesh" />
</httpModules>
as that is already loaded with the main ccnet web. If you change web configuration you may have to play with this, but it worked for me.
Now, you can go to each web individually, or you can use the webdashboard. Create a new IIS application to /webdashboard. You need to also configure the application in IIS admin for a special handler. Go to Configuration | Mappings. Add new. The executable path should be the path to your aspnet_isapi.dll (just copy the location from the handler from aspx) and the extension should be .xml. Make sure “Script Engine” is checked, and that “Verify that file exists” is unchecked.
You should now be able to go to http://buildmachine/ccnetwebdashboard (or whatever you named it) and see the build status of all projects under CCNET’s influence. You can then hit each project web from here, force a build, and refresh status.
That’s it. Pretty simple really. Seemed like a lot of work though, so maybe I did it ass-backward…but it works for me. If you have a better (or more proper) way to set up multiple projects please let me know.
Tags:
Continuous Integration