Ruby CI on Jenkins – Installation steps

Steps for setting up Ruby CI on Jenkins running on EC2 micro instance, Ubuntu 12.04.

  1. sudo apt-get update
  2. Install jre/jdk
    • sudo apt-get install openjdk-6-jre openjdk-6-jdk
  3. Install jenkins
  4. Switch user to jenkins user
    • sudo su – jenkins
  5. Install git
    • sudo apt-get git-core
  6. Set jenkins git user/email
    • git config –global “
    • git config –global “jenkins”
  7. Install rvm and install/use ruby 1.9.2 as jenkins user (takes ages…)
  8. Setup jenkins project and add bash script build step to call rake (needs all lines to set paths, install bundler, get gems, run rake)
    • #!/bin/bash
      source ~/.bash_profile
      rvm use 1.9.2
      gem install bundler
      bundle install
      bundle exec rake

Call explicit rake tasks to change build steps to perform build/deploy tasks.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s