#!/bin/bash -x
source '/usr/local/lib/rvm'
bundle install --path "/home/jenkins/bundles/${JOB_NAME}" --deployment --without=development

# DELETE STATIC SYMLINKS AND RECONNECT...
for dir in images javascripts templates stylesheets; do
  rm /var/lib/jenkins/jobs/Smart_Answers/workspace/public/$dir
  ln -s /var/lib/jenkins/jobs/Static/workspace/public/$dir /var/lib/jenkins/jobs/Smart_Answers/workspace/public/$dir
done

export DISPLAY=:99
RAILS_ENV=test bundle exec rake test
RESULT=$?
exit $RESULT

#!/bin/bash -x
source '/usr/local/lib/rvm'
bundle install --path "/home/jenkins/bundles/${JOB_NAME}" --deployment --without=development

# DELETE STATIC SYMLINKS AND RECONNECT...
for dir in images javascripts templates stylesheets; do
  rm public/$dir
  ln -s ../../Static/workspace/public/$dir public/$dir
done

export DISPLAY=:99
RAILS_ENV=test bundle exec rake test
RESULT=$?
exit $RESULT

Use relative links to decouple from Jenkins configuration.
Use relative links to decouple from Jenkins configuration.
