Tuesday, April 7, 2009

SVN to git and cruisecontrol.rb

We're finally moving from svn to git.  Yesterday, I worked on upgrading our cruisecontrol.rb to monitor our git repository.  Previously, we were on svn and using cruisecontrolrb-1.2.1 so it was time to upgrade CruiseControl and migrate to git in one fell swoop.

Our team uses Unfuddle so the first step was to work with them on completing the svn git clone.

Our cruisecontrol set-up includes an apache web server in front of the cruisecontrol.rb rails application with integration to our Campfire room via a plugin.

Here are the steps I followed:

  1. Set-up a user that has read-only access to our git repository - The steps I followed here were specific to Unfuddle and included putting the public key into the Unfuddle user's personal settings.
  2. Build Cruisecontrol.rb - git clone \ git://github.com/thoughtworks/cruisecontrol.rb.git
  3. Copy the campfire plugin from OLD_CRUISE_ROOT/builder_plugins/installed/campfire_notifiter.rb to NEW_CRUISE_ROOT/lib/builder_plugins
  4. Copy .yml files from OLD_CRUISE_ROOT/config to NEW_CRUISE_ROOT/config
  5. Update my front-end apache server to point to the new cruise installation
  6. remove the .htaccess file from NEW_CRUISE_ROOT/public/.htaccess
With all the configuration complete, I'm now ready to add projects.  In the svn days, we'd always monitor trunk and the branch currently running in production.  Here's how to add the same using git:

./cruise add PROJECT_NAME --source-control git \
--repository git@our.host:repo/name.git

./cruise add PROJECT_NAME --source-control git \
--repository git@our.host:repo/name.git --branch BRANCH_NAME


1 comment:

Rich said...

Nice Work Harvey!