Monday, 14 December 2009

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!