summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-08-04 19:20:30 -0700
committerTim Smith <tsmith84@gmail.com>2020-08-04 19:20:30 -0700
commitaff5591ee445bccef79b89557840545ba4379d2c (patch)
tree43702c0741ddcec34a1cc8aa482b860d33269875
parent760e8b596f2be5b4e77bd076d9fece38dba1b723 (diff)
downloadchef-aff5591ee445bccef79b89557840545ba4379d2c.tar.gz
Speed up our bundle installs by always running 3 jobsfaster_bundler_installs
multi-job bundle install is the default in the next release, but for now we should make sure we set it everywhere. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--habitat/plan.ps12
-rw-r--r--habitat/plan.sh2
-rw-r--r--omnibus/omnibus-test.sh2
-rwxr-xr-xtasks/bin/run_external_test2
-rw-r--r--tasks/rspec.rb2
5 files changed, 5 insertions, 5 deletions
diff --git a/habitat/plan.ps1 b/habitat/plan.ps1
index 2b21ae889c..8269e436a5 100644
--- a/habitat/plan.ps1
+++ b/habitat/plan.ps1
@@ -80,7 +80,7 @@ function Invoke-Build {
$env:_BUNDER_WINDOWS_DLLS_COPIED = "1"
Write-BuildLine " ** Using bundler to retrieve the Ruby dependencies"
- bundle install
+ bundle install --jobs=3 --retry=3
if (-not $?) { throw "unable to install gem dependencies" }
Write-BuildLine " ** 'rake install' any gem sourced as a git reference so they'll look like regular gems."
foreach($git_gem in (Get-ChildItem "$env:GEM_HOME/bundler/gems")) {
diff --git a/habitat/plan.sh b/habitat/plan.sh
index 967cdd334e..64f424dfac 100644
--- a/habitat/plan.sh
+++ b/habitat/plan.sh
@@ -93,7 +93,7 @@ do_prepare() {
do_build() {
( cd "$CACHE_PATH" || exit_with "unable to enter hab-cache directory" 1
build_line "Installing gem dependencies ..."
- bundle install
+ bundle install --jobs=3 --retry=3
build_line "Installing this project's gems ..."
bundle exec rake install
for gem in $GEM_HOME/bundler/gems/*; do
diff --git a/omnibus/omnibus-test.sh b/omnibus/omnibus-test.sh
index d33ade448c..3117d6efb6 100644
--- a/omnibus/omnibus-test.sh
+++ b/omnibus/omnibus-test.sh
@@ -156,6 +156,6 @@ fi
CHEF_LICENSE=accept-no-persist
cd "$chef_gem"
-sudo -E bundle install
+sudo -E bundle install --jobs=3 --retry=3
# FIXME: we need to add back unit and integration tests here. we have no coverage of those on e.g. AIX
sudo -E bundle exec rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec/functional
diff --git a/tasks/bin/run_external_test b/tasks/bin/run_external_test
index 2eb45c8aab..16f21d8e37 100755
--- a/tasks/bin/run_external_test
+++ b/tasks/bin/run_external_test
@@ -32,7 +32,7 @@ Dir.mktmpdir("chef-external-test") do |dir|
Dir.chdir(dir) do
shell_out!("git checkout #{git_thing}", live_stream: STDOUT)
Bundler.with_unbundled_env do
- shell_out!("bundle install", live_stream: STDOUT, env: env)
+ shell_out!("bundle install --jobs=3 --retry=3", live_stream: STDOUT, env: env)
shell_out!("bundle exec #{ARGV.join(" ")}", live_stream: STDOUT, env: env)
end
end
diff --git a/tasks/rspec.rb b/tasks/rspec.rb
index 99b3563788..647efd647a 100644
--- a/tasks/rspec.rb
+++ b/tasks/rspec.rb
@@ -30,7 +30,7 @@ begin
%w{chef-utils chef-config}.each do |gem|
Dir.chdir(gem) do
Bundler.with_unbundled_env do
- sh("bundle install")
+ sh("bundle install --jobs=3 --retry=3")
sh("bundle exec rake spec")
end
end