Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automated builds of branches with SVN

Tags:

What I'm looking to do is have CI and an automated build for all of my branches in a repository. I'd like each build of these web apps to have it's own project and be placed as a virtual directory (or equivalent) on a branches site. This would be great to be able to create a new branch and have it start the continuous integration and build process automatically. Adding a new virtual directory in IIS isn't a big deal, I'm ok with doing this if the rest just puts itself in place.

For Example:

http://branch.domain.com/branch101/

http://branch.domain.com/otherBranchName/

Currently, I'm using SVN, Nant and CruiseControl.Net, but I'm open another continuous integration server or build scripting if the situation demands it.

like image 903
Chris Missal Avatar asked Aug 06 '09 16:08

Chris Missal


People also ask

Does SVN support branching?

Subversion Branching StrategiesSubversion branches (SVN branches) allow your team to work on multiple versions of your code simultaneously. Developers can test out new features without impacting the rest of development with errors and bugs. SVN's “branch” directory runs parallel to the “trunk” directory.

What is SVN in automation?

What Is SVN? SVN is a simple and open-source license Software Configuration Management (SCM) tool that can be used in all the phases of Software Projects. SVN is a Subversion control tool that helps us to maintain all the project artifacts in a script repository.


2 Answers

This can be done, but alot of it is going to depend on your build scripts. If you tell cc.net to monitor the top level svn folder so for example have you project monitor:

http://myserver.com/svn/project rather than http://myserver.com/svn/project/trunk. If any changes are seen in http://myserver.com/svn/project it will kick off a build.

Now, it is up to your build script to determine what source is out of date or if there is a new branch to build. The build script would create a new VDir for any new branches.

Another option would be to have a cc.net project that was designed to do nothing other than add new projects to your cc.net. (Call it BranchBuilder project) I would leverage the pre-processor in cc.net and have a top level .config file that just included the project for trunk and each branch. The branch builder project would monitory the root path on svn. If it saw any changes it would look to see if there were any new branches since the last build. If there was one, it could create a ccnet-branchname.config file for that branch, create the vdir and then update the ccnet.config root file with an additional include.

After the ccnet config has been update cc.net will recognize the config file has been modified and reload the config adding your new branch project. That branch project would start running and build your new branch.

like image 74
PilotBob Avatar answered Oct 11 '22 16:10

PilotBob


I do not understand the real question. Anyway I suggest you Hudson (http://hudson-ci.org/).

It's easy to use. It's easy to configure with XML files. It has remote API.

like image 40
Davide Ungari Avatar answered Oct 11 '22 16:10

Davide Ungari