Skip to content

A prebuild script that helps set up Ruby builds in Atlassian Bamboo using RVM.

License

Notifications You must be signed in to change notification settings

AMEE/rvm-bamboo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

rvm-bamboo

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

Homepage: http://github.com/AMEE/rvm-bamboo

Installation

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

git checkout https://github.com/AMEE/rvm-bamboo.git

Then read the Usage section below.

Requirements

  • 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)

Usage

  1. Set up rvm for your build user

    See https://rvm.beginrescueend.com/rvm/install/ 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 https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
    

    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.sh <build_key> <task>
    

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

    /path/to/build.sh RUBY-DEV spec
    

    You can of course use the build key automatically:

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

    **/spec/reports/*.xml
    
  4. Hit 'save', run your build, and it should just work.

Details

  • 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'

About

A prebuild script that helps set up Ruby builds in Atlassian Bamboo using RVM.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages