Skip to content

Commit

Permalink
Use bundle config set path
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
  • Loading branch information
jasonwbarnett committed Sep 21, 2021
1 parent 77a27db commit b6d23f4
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 28 deletions.
3 changes: 2 additions & 1 deletion .expeditor/scripts/bk_linux_exec.sh
Expand Up @@ -33,7 +33,8 @@ export CHEF_LICENSE="accept-silent"
echo "--- Installing Gems"
echo 'gem: --no-document' >> ~/.gemrc
sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
bundle install --jobs=3 --retry=3 --path=../vendor/bundle
bundle config set --local path 'vendor/bundle'
bundle install --jobs=3 --retry=3

echo "--- Config information"

Expand Down
5 changes: 3 additions & 2 deletions .expeditor/scripts/bk_win_prep.ps1
Expand Up @@ -12,5 +12,6 @@ if (-not $?) { throw "Can't run Bundler. Is it installed?" }

echo "--- bundle install"
bundle config set --local without omnibus_package
bundle install --jobs=3 --retry=3 --path=vendor/bundle
if (-not $?) { throw "Unable to install gem dependencies" }
bundle config set --local path 'vendor/bundle'
bundle install --jobs=3 --retry=3
if (-not $?) { throw "Unable to install gem dependencies" }
66 changes: 44 additions & 22 deletions .expeditor/verify.pipeline.yml
Expand Up @@ -20,7 +20,8 @@ steps:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- cd chef-utils
- bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec
expeditor:
executor:
Expand All @@ -32,7 +33,8 @@ steps:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- cd chef-config
- bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec
expeditor:
executor:
Expand All @@ -47,7 +49,8 @@ steps:
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- cd /workdir; bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec:integration
expeditor:
executor:
Expand All @@ -61,7 +64,8 @@ steps:
- apt-get update -y
- apt-get install -y cron locales # needed for functional tests to pass
- cd /workdir; bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec:functional
expeditor:
executor:
Expand All @@ -73,7 +77,8 @@ steps:
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec:unit
- bundle exec rake component_specs
expeditor:
Expand All @@ -85,7 +90,8 @@ steps:
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- cd /workdir; bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec:integration
expeditor:
executor:
Expand All @@ -99,7 +105,8 @@ steps:
- apt-get update -y
- apt-get install -y cron locales # needed for functional tests to pass
- cd /workdir; bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec:functional
expeditor:
executor:
Expand All @@ -111,7 +118,8 @@ steps:
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec:unit
- bundle exec rake component_specs
expeditor:
Expand All @@ -123,7 +131,8 @@ steps:
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- cd /workdir; bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec:integration
expeditor:
executor:
Expand All @@ -136,7 +145,8 @@ steps:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- yum install -y crontabs e2fsprogs
- cd /workdir; bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec:functional
expeditor:
executor:
Expand All @@ -148,7 +158,8 @@ steps:
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec:unit
- bundle exec rake component_specs
expeditor:
Expand All @@ -161,7 +172,8 @@ steps:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- zypper install -y cron insserv-compat
- cd /workdir; bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec:integration
expeditor:
executor:
Expand All @@ -174,7 +186,8 @@ steps:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- zypper install -y cronie insserv-compat
- cd /workdir; bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec:functional
expeditor:
executor:
Expand All @@ -187,7 +200,8 @@ steps:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- zypper install -y cron insserv-compat
- bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec:unit
- bundle exec rake component_specs
expeditor:
Expand All @@ -199,7 +213,8 @@ steps:
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- cd /workdir; bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec:integration
expeditor:
executor:
Expand All @@ -212,7 +227,8 @@ steps:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- dnf install -y crontabs e2fsprogs
- cd /workdir; bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec:functional
expeditor:
executor:
Expand All @@ -227,7 +243,8 @@ steps:
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec:unit
- bundle exec rake component_specs
expeditor:
Expand Down Expand Up @@ -279,7 +296,8 @@ steps:
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec tasks/bin/run_external_test chef/chef-zero main rake pedant
expeditor:
executor:
Expand All @@ -293,7 +311,8 @@ steps:
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec tasks/bin/run_external_test chef/cheffish main rake spec
expeditor:
executor:
Expand All @@ -304,7 +323,8 @@ steps:
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec tasks/bin/run_external_test chefspec/chefspec main rake
expeditor:
executor:
Expand All @@ -315,7 +335,8 @@ steps:
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec tasks/bin/run_external_test chef/knife-windows main rake spec
expeditor:
executor:
Expand All @@ -328,7 +349,8 @@ steps:
- apt-get update -y
- apt-get install -y graphviz
- bundle config set --local without omnibus_package
- bundle install --jobs=3 --retry=3 --path=vendor/bundle
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec tasks/bin/run_external_test berkshelf/berkshelf main rake
expeditor:
executor:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/kitchen.yml
Expand Up @@ -41,7 +41,8 @@ jobs:
cd kitchen-tests
$env:PATH = "C:\opscode\chef\bin;C:\opscode\chef\embedded\bin;" + $env:PATH
bundle config set --local without 'omnibus_package'
bundle install --jobs=3 --retry=3 --path=vendor/bundle
bundle config set --local path 'vendor/bundle'
bundle install --jobs=3 --retry=3
gem install berkshelf --no-doc
# berks emits a ruby warning when it loads net/http due to a previously
# defined constant. Even though it is just a warning, powershell immediately
Expand Down Expand Up @@ -83,7 +84,8 @@ jobs:
run: |
cd kitchen-tests
sudo /opt/chef/embedded/bin/bundle config set --local without 'omnibus_package'
sudo /opt/chef/embedded/bin/bundle install --jobs=3 --retry=3 --path=vendor/bundle
sudo /opt/chef/embedded/bin/bundle config set --local path 'vendor/bundle'
sudo /opt/chef/embedded/bin/bundle install --jobs=3 --retry=3
sudo /opt/chef/embedded/bin/gem install berkshelf --no-doc
sudo /opt/chef/embedded/bin/berks vendor cookbooks
sudo /opt/chef/bin/chef-client -z -o end_to_end --chef-license accept-no-persist
Expand Down
3 changes: 2 additions & 1 deletion tasks/rspec.rb
Expand Up @@ -30,7 +30,8 @@
puts "--- Running #{gem} specs"
Bundler.with_unbundled_env do
puts "Executing tests in #{Dir.pwd}:"
sh("bundle install --jobs=3 --retry=3 --path=../vendor/bundle")
sh("bundle config set --local path 'vendor/bundle'")
sh("bundle install --jobs=3 --retry=3")
sh("bundle exec rake spec")
end
end
Expand Down

0 comments on commit b6d23f4

Please sign in to comment.