From d64fe19d22a09efb654a2bf6783b79e42fae8a40 Mon Sep 17 00:00:00 2001 From: Jason Frey Date: Mon, 17 Jul 2017 17:09:25 -0400 Subject: [PATCH] Fix bundle override in ManageIQ::Environment Commit 04d9a75b overrides Travis' built-in bundle install, which handles bundle caching as well as parallel installs and retries, but did so without any of those feature causing them to be lost in all of the provider repos. http://talk.manageiq.org/t/can-we-speed-up-small-repos-on-travis/2533 --- lib/manageiq/environment.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/manageiq/environment.rb b/lib/manageiq/environment.rb index 69a6dd7c816..bec306b3097 100644 --- a/lib/manageiq/environment.rb +++ b/lib/manageiq/environment.rb @@ -52,13 +52,19 @@ def self.install_bundler end def self.bundle_install(root = APP_ROOT) - system('bundle check', :chdir => root) || system!('bundle install', :chdir => root) + system("bundle check", :chdir => root) || + system!("bundle install #{bundle_params}", :chdir => root) end def self.bundle_update(root = APP_ROOT) - system!('bundle update', :chdir => root) + system!("bundle update #{bundle_params}", :chdir => root) end + def self.bundle_params + "--jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}" if ENV['CI'] + end + private_class_method :bundle_params + def self.create_database puts "\n== Updating database ==" run_rake_task("db:create")