Pages

Friday, 19 November 2010

Software dependencies and CI server

EDIT: 2013-07-22: I would not longer recommend this post. If I was to do the same again now I'd look at using Chocolatey.  

To build our suite of applications one alas must install a few things. I've love to get away from it and use something like Apache Ivy but alas I don't see that happening in the near future. Prior to installing a CI server we were managing this list of dependencies by the wonderful method of hope. Hope that someone had sent a mail indicating that a dependency exists and that everyone has read said mail. 
Hudson can't read emails and act on them in an intelligent manor so we shall have to automate it. The solution I am currently using is:
First I set up a software share with two folders, Static and Core.
Static is the MSI/other set up stuff that requires a degree of human interaction to make work. Visual Studio and Oracle drivers currently live in this folder. This remains a manual process, but requires the minimal amount of work to keep everything up to date as very few items will live in this folder.
Core is the MSI/setup files for the stuff that can be automated.

In the version control I have created a new "Environment" folder, in that is a "Build" sub folder containing a bat file which auto-installs all the core dependencies and looks somewhat like:

:: Silverlight 4
if exists "c:\DEV_SILVERLIGHT4.$$$" goto DoneSilverlight
start /wait %INSTALL_LOCATION%\Silverlight4_Tools.exe /q:a /c:"setup.exe /q /norestart"
start /wait c:\windows\system32\msiexec.exe /qb /i "%INSTALL_LOCATION%\Silverlight_4_toolkit_april_2010.msi"
echo Done > c:\DEV_SILVERLIGHT4.$$$
:DoneSilverlight

I've then created a new job on Hudson which checks out just the Environment\Build folder and executes this script. 

It is not ideal, the current solution does not support multiple slaves and finding out how to do silent installs can be a pain (luckily sites exist that help a lot) but is currently keeping our one-node Hudson server up-to-date and allowing any developer to update their machine without involving a sacrifice to the Gods Of Broken Builds.

No comments:

Post a Comment