3021: Cache packages with bundle package --all
[arvados-dev.git] / jenkins / run-tests.sh
index 63c1d7c5d5f3084b50c9fe9899ae42101d330031..98734ca62dd72f6d2a812bd88af204c5b849104f 100755 (executable)
@@ -417,6 +417,7 @@ install_doc() {
     cd "$WORKSPACE/doc" \
         && (bundle install --local --no-deployment \
         || bundle install --no-deployment) \
+        && bundle package --all \
         && rm -rf .site
 }
 do_install doc
@@ -426,6 +427,7 @@ install_ruby_sdk() {
         && cd "$WORKSPACE/sdk/ruby" \
         && (bundle install --local --no-deployment \
         || bundle install --no-deployment) \
+        && bundle package --all \
         && gem build arvados.gemspec \
         && with_test_gemset gem install --no-ri --no-rdoc `ls -t arvados-*.gem|head -n1`
 }
@@ -436,6 +438,7 @@ install_cli() {
         && cd "$WORKSPACE/sdk/cli" \
         && (bundle install --local --no-deployment \
         || bundle install --no-deployment) \
+        && bundle package --all \
         && gem build arvados-cli.gemspec \
         && with_test_gemset gem install --no-ri --no-rdoc `ls -t arvados-cli-*.gem|head -n1`
 }
@@ -460,7 +463,8 @@ done
 install_apiserver() {
     cd "$WORKSPACE/services/api" \
         && (RAILS_ENV=test bundle install --local --no-deployment \
-        || RAILS_ENV=test bundle install --no-deployment)
+        || RAILS_ENV=test bundle install --no-deployment) \
+        && bundle package --all
 
     rm -f config/environments/test.rb
     cp config/environments/test.rb.example config/environments/test.rb
@@ -522,7 +526,8 @@ done
 install_workbench() {
     cd "$WORKSPACE/apps/workbench" \
         && (RAILS_ENV=test bundle install --local --no-deployment \
-        || RAILS_ENV=test bundle install --no-deployment)
+        || RAILS_ENV=test bundle install --no-deployment) \
+        && bundle package --all
 }
 do_install apps/workbench workbench
 
@@ -561,8 +566,6 @@ test_apiserver() {
 }
 do_test services/api apiserver
 
-rotate_logfile "$WORKSPACE/services/api/log/" "test.log"
-
 start_api
 
 test_ruby_sdk() {
@@ -609,6 +612,7 @@ do_test apps/workbench_profile workbench_profile
 rotate_logfile "$WORKSPACE/apps/workbench/log/" "test.log"
 
 stop_api
+rotate_logfile "$WORKSPACE/services/api/log/" "test.log"
 
 report_outcomes
 clear_temp