Setting up Git/IronRuby/Rake/Albacore Builds with ThoughtWorks Go (Formerly known as Cruise) on Windows July, 2010
The following steps outline how to setup Git/IronRuby/Rake/Albacore builds with ThoughtWorks Go (Formally known as Cruise) on Windows. These same instructions should loosely apply to earlier versions of Cruise as well.
- Install the following on the build server:
- msysgit
- Add the Git bin folder to the system path
- Add the Git bin folder to the system path
- IronRuby
- Rake: igem install rake
- Albacore: igem install albacore
- ThoughtWorks Cruise both the server and at least one agent. (May require a reboot)
- If these are already installed restart both to pick up the new PATH environment variable.
- If the Cruise service fails to start, make sure that the following path exists: <Windows>\SysWOW64\config\
systemprofile\AppData\Local\ Temp\
- msysgit
Configuration
After the prerequisites have been installed, create and push a dummy rake script to next ensure that the build is configured properly (IE: release\build.rb):
# build.rb require 'rubygems' desc "Default" task :default do puts "Rake is working!" end
Next you will now need to create the Cruise pipeline. To start the pipeline wizard go to "Admin|Pipelines Configuration" in Cruise and click the "ADD NEW PIPELINE" button.
Next, in the wizard, set the builder to "rake" and enter the repository relative path to the rake script in addition to the "default" target. Also set the SCM to "Git" and the url of the Git repo.
The wizard generates the following pipeline which can then be directly modified:
<pipeline name="ProjectEuler.NET" labeltemplate="1.0.0.${COUNT}"> <materials> <git url="git://github.com/mikeobrien/ProjectEuler.NET.git" /> </materials> <stage name="CI"> <jobs> <job name="Default"> <tasks> <rake buildfile="release\build.rb" target="default" /> </tasks> </job> </jobs> </stage> </pipeline>
Next, either trigger a build or push a change and to test the build. That's all there is to it; very simple!
References