#!/bin/bash -x
source '/usr/local/lib/rvm'
bundle install --path "/home/jenkins/bundles/${JOB_NAME}" --deployment
bundle exec rake db:setup
bundle exec rake db:migrate
export DISPLAY=:99
/etc/init.d/xvfb start
bundle exec rake test:units test:integration 
RESULT=$?
/etc/init.d/xvfb stop
exit $RESULT
#!/bin/bash -x
source '/usr/local/lib/rvm'
bundle install --path "/home/jenkins/bundles/${JOB_NAME}" --deployment
bundle exec rake db:setup
bundle exec rake db:migrate

# DELETE STATIC SYMLINKS AND RECONNECT...
rm /var/lib/jenkins/jobs/Guides/workspace/public/images
rm /var/lib/jenkins/jobs/Guides/workspace/public/javascripts
rm /var/lib/jenkins/jobs/Guides/workspace/public/templates
rm /var/lib/jenkins/jobs/Guides/workspace/public/stylesheets

ln -s /var/lib/jenkins/jobs/Guides/workspace/public/images /var/lib/jenkins/jobs/Static/workspace/public/images
ln -s /var/lib/jenkins/jobs/Guides/workspace/public/javascripts /var/lib/jenkins/jobs/Static/workspace/public/javascripts
ln -s /var/lib/jenkins/jobs/Guides/workspace/public/templates /var/lib/jenkins/jobs/Static/workspace/public/templates
ln -s /var/lib/jenkins/jobs/Guides/workspace/public/stylesheets /var/lib/jenkins/jobs/Static/workspace/public/stylesheets

export DISPLAY=:99
/etc/init.d/xvfb start
bundle exec rake test:units test:integration 
RESULT=$?
/etc/init.d/xvfb stop
exit $RESULT

Reconnect static links on ci server
Reconnect static links on ci server
