Last active
October 12, 2015 16:36
-
-
Save todorus/1b10b58ede47586a0ede to your computer and use it in GitHub Desktop.
How to install a Rails Continuos integration server in Jenkins
This file contains hidden or 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
#!/bin/bash | |
source ~/.bashrc | |
rbenv install 2.2.0 | |
gem install bundle | |
# setup the tests | |
bundle install | |
bundle exec rake db:migrate RAILS_ENV=test | |
# run the tests | |
bundle exec rake rspec spec |
This file contains hidden or 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
# add ci gem to gemfile | |
https://github.com/ci-reporter/ci_reporter | |
# dependencies | |
sudo apt-get update | |
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-soft | |
# switch to the jenkins user | |
# install rbenv | |
cd | |
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
exec $SHELL | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc | |
exec $SHELL | |
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash | |
# install ruby (replace with the version you want) | |
rbenv install 2.2.3 | |
rbenv global 2.2.3 | |
ruby -v | |
# don't story documentation locally | |
echo "gem: --no-ri --no-rdoc" > ~/.gemrc | |
# install bundler gem | |
gem install bundler |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment