Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tk0miya
Created October 15, 2012 03:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tk0miya/3890652 to your computer and use it in GitHub Desktop.
Save tk0miya/3890652 to your computer and use it in GitHub Desktop.
Install RVM to jenkins recipe #chef
# This recipe is unused
# Please use RVM-Plugin for Jenkins
include_recipe "jenkins"
script "Install RVM to jenkins" do
interpreter "bash"
not_if {::File.exists?("/var/lib/jenkins/.rvm")}
code <<-EOH
sudo -u jenkins bash -c '
cd $HOME;
curl -L get.rvm.io | bash -s stable;
grep -q "Load RVM" $HOME/.bash_profile || echo "[[ -s \"\$HOME/.rvm/scripts/rvm\" ]] && source \"$HOME/.rvm/scripts/rvm\" # Load RVM into a shell session *as a function*" >> \$HOME/.bash_profile;
source $HOME/.rvm/scripts/rvm;
rvm install ruby-1.9.3-p194;
rvm use ruby-1.9.3-p194 --default;
rvm gemset create foobar-app
gem install bundler
'
EOH
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment