You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2013/10/12 00:43:51 UTC
svn commit: r1531453 - in /buildr/trunk: .travis.yml ci-setup.sh
Author: donaldp
Date: Fri Oct 11 22:43:51 2013
New Revision: 1531453
URL: http://svn.apache.org/r1531453
Log:
Add some resilience to the travis-ci job so that if rubygems is temperamental or fails it will retry
Added:
buildr/trunk/ci-setup.sh
Modified:
buildr/trunk/.travis.yml
Modified: buildr/trunk/.travis.yml
URL: http://svn.apache.org/viewvc/buildr/trunk/.travis.yml?rev=1531453&r1=1531452&r2=1531453&view=diff
==============================================================================
--- buildr/trunk/.travis.yml (original)
+++ buildr/trunk/.travis.yml Fri Oct 11 22:43:51 2013
@@ -14,8 +14,7 @@ scala:
# - 2.9.1
# - 2.8.1
install:
- - gem install bundler
- - bundle install
+ - source ci-setup.sh
- export JRUBY_OPTS="-J-XX:MaxPermSize=312m -J-Xmx700M"
- export JAVA_OPTS="-Xmx700m -XX:MaxPermSize=312m"
script: rake ci
Added: buildr/trunk/ci-setup.sh
URL: http://svn.apache.org/viewvc/buildr/trunk/ci-setup.sh?rev=1531453&view=auto
==============================================================================
--- buildr/trunk/ci-setup.sh (added)
+++ buildr/trunk/ci-setup.sh Fri Oct 11 22:43:51 2013
@@ -0,0 +1,24 @@
+update_bundler() {
+ gem list | grep 'bundler' &> /dev/null
+ if [ $? -gt 0 ]; then
+ gem install bundler
+ fi
+ if [ "$1" = 'quiet' ]; then
+ bundle install --deployment > /dev/null 2> /dev/null
+ else
+ bundle install --deployment
+ fi
+}
+
+i="0"
+
+until (bundle check > /dev/null 2> /dev/null) || [ $i -gt 10 ]; do
+ echo "Bundle update. Attempt: $i"
+ update_bundler 'quiet'
+ i=$[$i+1]
+done
+
+if !(bundle check > /dev/null 2> /dev/null); then
+ echo "Last Bundle update attempt."
+ update_bundler
+fi