Skip to content
A prebuild script that helps set up Ruby builds in Atlassian Bamboo using RVM.
Find file
Failed to load latest commit information.
LICENSE.txt Added documentation files Jan 10, 2012 Change to markdown for README Jan 11, 2012 Tidy up of default ruby version code Jan 10, 2012


Build script to help run Ruby builds under RVM with Atlassian Bamboo

Licensed under the BSD 3-Clause license (See LICENSE.txt for details)

Authors: James Smith

Copyright: Copyright (c) 2012 AMEE UK Ltd



Just grab the code from git and put it somewhere useful:

git checkout

Then read the Usage section below.


  • RVM
  • Atlassian Bamboo (though this would work with any CI system expecting JUnit output)
  • RSpec (you need to be using this for the JUnit output formatting)


  1. Set up rvm for your build user

    See for details. Don't install as root, just do the single-user install while logged in as your build user.

    bash -s stable < <(curl -s )

    Don't worry about adding to the path or sourcing the functions - the script takes care of that. You will want to run

    rvm requirements

    and make sure everything you need is installed before proceeding.

  2. For each build, enter the following as the build command:

    /path/to/ <build_key> <task>

    For instance, if you are configuring the RUBY-DEV build to run the 'rake spec' task, you would enter:

    /path/to/ RUBY-DEV spec

    You can of course use the build key automatically:

    /path/to/ ${bamboo.buildKey} spec
  3. Check 'this build will produce test results' and enter the following in the box below:

  4. Hit 'save', run your build, and it should just work.


  • The Ruby version is grabbed from .rvmrc in your source directory, so be sure to check that in.
  • The script creates a gemset for each configuration, named after the build name. The gemset in .rvmrc is ignored.
  • The CI::Reporter gem is automatically included in the build command for JUnit output.
  • Anything that uses bundler will work out of the box, as should Rails 2 apps that use 'rake gems:install'
Something went wrong with that request. Please try again.