Thursday 31 December 2009

Setup CruiseControl Useful URL

http://ilmatte.wordpress.com/2008/06/01/cruisecontrolnet-tutorial-part-1/#ccnettutprojectconfiguration

SVN Setup

  1. Created a new folder for storing respositories at C:\Repositories
  2. Changed Windows Service to use this location
  3. Added folder GolfMine inside C:\Repositories
  4. Created SVN repository using command line

    svnadmin create --fs-type fsfs C:\Repositories\GolfMine

  5. Did an initial import of the branch,tags & trunk directory using a file upload to

    file:///C:/Repositories/GolfMine

  6. Moved C:\Project\GolfMine to GolfMineOld
  7. Created a new directory GolfMine
  8. SVN Checkout to GolfMine from

    svn://localhost/GolfMine/trunk

  9. Put the contents of GolfMineOld into GolfMine
  10. Performed an SVN Add but removed all
    */obj directories
    */bin directories
    /build directory
    checked in all files in the /tools directory

Setup the repository

When creating the repository in the post on how to do SVN\Tortoise\AnkhSVN the default repository was created but did not create the correct file type. I used the following command to create it

svnadmin create --fs-type fsfs C:\Repository
As per




The repository is at
C:\Repository

Have changed
C:\Repository\conf\svnserve.conf

Uncommented
[general]
anon-access = read
auth-access = write
password-db = passwd

C:\Repository\conf\passwd
[users]
Added a user in the format
username = password



Running SubVersion as a service

sc create svnserve
binpath=
"C:\Program Files\Subversion\bin\svnserve.exe -r
C:\Repository --service"
displayname="Subversion"
depend=Tcpip
start= auto

Monday 14 December 2009

SubVersion, Tortoisesvn, ankhsvn - Useful Post!

http://ilmatte.wordpress.com/2008/04/27/guide-to-versioning-a-visual-studio-solution-with-subversion-tortoisesvn-and-ankhsvn/

Nant build fails due to registry error for .net 3.5 location

I had a problem that the build wouldn't run and was producing the following error

"The SDK for the 'net-3.5' framework is not available or not configured."

I narrowed this down to Nant not having the right location for the .Net 3.5 SDK, below is a great article which describes the problem in full.

Sound effects

Just for fun I added some sound effects to the build based on Warcraft II's original classic sound which I found online for use at.

http://www.thanatosrealms.com/war2/horde-sounds.html

GolfMine.build



<?xml version="1.0" ?>
<project name="GolfMine" default="test" xmlns="http://nant.sf.net/schemas/nant.xsd">
<property name="build.dir" value="build" />
<property name="nant.settings.currentframework" value="net-3.5" />

<!-- User targets -->
<target name="clean" description="Delete Automated Build artifacts">
 <delete dir="${build.dir}" if="${directory::exists(build.dir)}"/>
</target>

<target name="compile" description="Compiles using the AutomatedDebug Configuration">
 <msbuild project="src\GolfMine.sln">
  <property name="Configuration" value="AutomatedDebug" />
 </msbuild>
</target>

<target name="test" depends="compile, run-unit-tests"
description="Compile and Run Tests" />

<target name="full" depends="clean, test, dist" description="Compiles, tests, and produces distributions" />

<!-- Internal targets -->
<target name="run-unit-tests">
 <mkdir dir="${build.dir}\test-reports" />
 <exec program="regsvr32" workingdir="tools\NCover" commandline="/s CoverLib.dll" />
 <exec program="tools\ncover\NCover.Console.exe"
workingdir="${build.dir}\Debug\UnitTests">
  <arg value="//w &quot;.&quot;" />
  <arg value="//x &quot;..\..\test-reports\Coverage.xml&quot;" />
  <arg value="&quot;..\..\..\tools\nunit\nunit-console.exe&quot;" />
  <arg value="&quot;GolfMine.UnitTests.dll&quot; &quot;/xml:..\..\test-reports\UnitTests.xml&quot; &quot;/nologo&quot;" />
 </exec>
</target>

<target name="dist">
 <copy todir="${build.dir}\dist">
  <fileset basedir="${build.dir}\Debug\GolfMine">
   <include name="**\*"/>
   <exclude name="**\*.pdb" />
  </fileset>
 </copy>
 <zip zipfile="${build.dir}\GolfMine.zip">
  <fileset basedir="${build.dir}\dist">
   <include name="**\*" />
  </fileset>
 </zip>
</target>

</project>

 



ccnet.config

<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
 <project>
  <name>GolfMine</name>
  <workingDirectory>C:\Integration\GolfMine\WorkingDirectory</workingDirectory>
  <artifactDirectory>C:\Integration\GolfMine\Artifacts</artifactDirectory>
  <triggers>
   <intervalTrigger seconds="60" name="continous"/>
  </triggers>
  <tasks>
   <nant>
    <executable>C:\Projects\GolfMine\tools\nant\nant.exe</executable>
    <baseDirectory>C:\Projects\GolfMine</baseDirectory>
    <buildFile>GolfMine.build</buildFile>
   </nant>
  </tasks>
 </project>
</cruisecontrol>

TreeSurgeon

As a quick way to get a build script off the ground I came across TreeSurgeon which creates a great stub into which C sharp projects can be created.

Using this I creates a project at

C:\Projects\GolfMine

GolfMine is the research project that I am using for creating a semantic web based directory for golf.

Cruise Control .Net

My main aim has been to create a Continuous Integeration build environment to explore the possibilities of automating as much of the build as possible. This is based on the book by Paul M Duvall "Continious Integration".

Based on the ideas of software development which are kind of lead by Martin Fowler


So to get started I have installed CruiseControl.Net and its associated tools

  • CruiseControl.Net 1.5
  • CruiseControl.Net CCTray 1.5
  • CruiseControl.Net Tools 1.5

Installation of CruiseControl.Net was straight forward, after downloading and running the setup.exe executable there was a minor tweak to do to get the virtual folder registered.

Under Internet Information Server I created a new Virtual Application which was linked to the folder

C:\Program Files\CruiseControl.NET\webdashboard

Using the alias of 'ccnet'

I needed to adjust the file permissions to allow IIS_IUSRS access to read, read & execute, list folder contents.

The icon on the desktop needed to be set to run as administrator because of Vista permissions as the process was having trouble executing some tasks with out this.


Initial Setup

This research is being done on a Intel based MacBookPro, one of the more classic looking silver numbers. The machine is running BootCamp with Windows Vista 32 Bit. I am generally installing all operating system updates.

Microsoft software installed includes
  1. .Net Framework 2.0 SDK
  2. .Net Framework 3.5 SDK
  3. Visual C# 2008 Express Edition
  4. Visual Web Developer 2008 Edition
  5. SQL Server 2008 Express
  6. Internet Explorer 8.0
  7. Web Platform Installer

First Post

With the intention of creating a fully automated build environment this blog is dedicated to creating a collection notes to enable me to keep track of what has been done so far. It may be useful to others but at the very least it is useful to me!