Created
October 15, 2012 03:12
-
-
Save tk0miya/3890652 to your computer and use it in GitHub Desktop.
Install RVM to jenkins recipe #chef
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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