diff --git a/jenkins/acceptance.sh b/jenkins/acceptance.sh index 8bcaa209ffff57376a19844070cfaaab6713b6fe..6ea6b0222eadf74b41e59ed437a62b1b10292479 100755 --- a/jenkins/acceptance.sh +++ b/jenkins/acceptance.sh @@ -51,6 +51,13 @@ mongo --quiet --eval 'db.getMongo().getDBNames().forEach(function(i){db.getSibli # not already be fetched. git fetch origin master:refs/remotes/origin/master +# Reset the jenkins worker's ruby environment back to +# the state it was in when the instance was spun up. +if [ -e $HOME/edx-rbenv_clean.tar.gz ]; then + rm -rf $HOME/.rbenv + tar -C $HOME -xf $HOME/edx-rbenv_clean.tar.gz +fi + # Bootstrap Ruby requirements so we can run the tests bundle install diff --git a/jenkins/all-tests.sh b/jenkins/all-tests.sh index 7d0bf8720c558f7bc98107110a79287c84f23660..53adcc33b9c86820131ec87232ff293a2c50e750 100755 --- a/jenkins/all-tests.sh +++ b/jenkins/all-tests.sh @@ -59,6 +59,13 @@ mongo --quiet --eval 'db.getMongo().getDBNames().forEach(function(i){db.getSibli # not already be fetched. git fetch origin master:refs/remotes/origin/master +# Reset the jenkins worker's ruby environment back to +# the state it was in when the instance was spun up. +if [ -e $HOME/edx-rbenv_clean.tar.gz ]; then + rm -rf $HOME/.rbenv + tar -C $HOME -xf $HOME/edx-rbenv_clean.tar.gz +fi + # Bootstrap Ruby requirements so we can run the tests bundle install