When you are first setting up your build server a few important items may not appear important in the beginning. One such thing may be the conservation of disk space, and hey, if you have a small source tree disk space may never be an issue. However, if your tree is anything like mine (> 1.5 gig in total size. This includes all sources and binaries needed to run our applications) then you will quickly come to appreciate the notion of conservation. Our build server currently have 40+ builds and there is no way I want each build to take up to 1.5 gig of disk space.
No I know you may be asking, why do you need the entire source tree for each build? The answer is quite simple. We have a very, very large application with many cross dependencies (we are working on resolving many of these) so building one portion of our code base may require other projects to be built, or for other binaries to be brought in.
The good news for Hudson users is there is a way to setup your builds so that many builds user a common workspace. Here is how to do this.
- On your build server do a manual pull of your source tree into a common location. Lets say d:\Hudson\Workspaces\YOUR_PROJECT_HERE
- When setting up (or modifying) a build click the Advanced Button
- Check the check box ‘Use Custom Workspace’
- In the Source code Management section provide your info as normal. One thing to watch out for is this. In the section (for svn) that asks for the Local Module Directory name make sure you provide the name of the subfolder EXACTLY. If you do not put this in correctly each rebuild will force a clean check out and will kill all the source.
- Now simply use Hudson as you would normally, but this time all your source will be in the shared workspace and the build history will be in the specific workspace for this build.
Hope this help,
Till next time,
Posted
12-07-2009 5:58 AM
by
Derik Whittaker