R – Building a tagged project with CruiseControl.Net

cruisecontrol.netnantsvntagging

my manager has asked me to setup build automation for our projects. I have decided to use CruiseControl.Net as our continuous integration server as some other team members have a little experience with it, I have none – which is why I am happy to undertake this task.

We are using Subversion as our repository and the ultimate goal is to instantiate a build each time a project is tagged. So for example:

Adding a folder to svn://svn/tags/ProjectX/ such as svn://svn/tags/ProjectX/JulyCheckPoint
should checkout the newly added tag (svn://svn/tags/ProjectX/JulyCheckPoint) to a local directory (D:\temp\tags\ProjectX\JulyCheckPoint) and run a nant file (D:\temp\tags\ProjectX\JulyCheckPoint\nant.build)

I know CruiseControl is able to monitor svn://svn/tags/ProjectX/ for changes, but I am unsure as to how I am going to checkout the latest tag to the build server's local disk and run the nant.build within if I don't know the the name of the most recent tag. I have done a bit of googling and believe that svn post-commit hooks may be something I should look into.

I hope all that makes sense, please let me know if you require further details/clarification. Any guidance/advice would be greatly appreciated.

Cheers.

Best Answer

Since you know how to monitor /svn/tags/ProjectX/ for changes, you can have it trigger a nant script. This script can execute commands against svn (see svn tasks in http://nantcontrib.sourceforge.net/release/0.85/help/tasks/index.html) to checkout the latest folder in /svn/tags/ProjectX/. From here you can use this nant script to call the nant script in checked out folder using the nant task.

Related Topic