Skip to content

Instantly share code, notes, and snippets.

@maxschulze
Created July 17, 2011 20:30
Show Gist options
  • Save maxschulze/1088028 to your computer and use it in GitHub Desktop.
Save maxschulze/1088028 to your computer and use it in GitHub Desktop.
Hudson run script for rspec/cucumber and ruby-1.9.2-p136 with RVM
#!/bin/bash -l
source "$HOME/.rvm/scripts/rvm"
# Use the correct ruby
rvm --create "1.9.2-p136@project"
gem install bundler
export RAILS_ENV=test
export DISPLAY=:99
cp $WORKSPACE/../database.yml $WORKSPACE/config/database.yml
cd $WORKSPACE
bundle
bundle exec rake -f $WORKSPACE/Rakefile db:migrate
bundle exec rake -f $WORKSPACE/Rakefile db:test:clone
sudo /etc/init.d/xvfb start
bundle exec rake -f $WORKSPACE/Rakefile ci:setup:rspec spec
bundle exec rake -f $WORKSPACE/Rakefile ci:setup:cucumber cucumber
RESULT=$?
sudo /etc/init.d/xvfb stop
exit $RESULT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment