diff options
author | John Keiser <john@johnkeiser.com> | 2016-04-15 12:10:40 -0700 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2016-04-18 14:21:02 -0700 |
commit | ea2593fe58037739c5c2ada517e3d988dec290ff (patch) | |
tree | 55142ceaef43080201a8d9e54f79868368241f60 /omnibus/files/chef/build-chef.rb | |
parent | bbc1d6ebccbd7f22fea72a9c2b76ef19f3b5beb3 (diff) | |
download | chef-ea2593fe58037739c5c2ada517e3d988dec290ff.tar.gz |
Make gemfile_util capable of copying groups over
Diffstat (limited to 'omnibus/files/chef/build-chef.rb')
-rw-r--r-- | omnibus/files/chef/build-chef.rb | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/omnibus/files/chef/build-chef.rb b/omnibus/files/chef/build-chef.rb index 21bd6c2250..dd2f76e049 100644 --- a/omnibus/files/chef/build-chef.rb +++ b/omnibus/files/chef/build-chef.rb @@ -9,12 +9,6 @@ module BuildChef include BuildChefGem def create_bundle_config(gemfile, without: without_groups, retries: nil, jobs: nil, frozen: nil) - if without - without = without.dup - # no_aix, no_windows groups - without << "no_#{Omnibus::Ohai["platform"]}" - end - bundle_config = File.expand_path("../.bundle/config", gemfile) block "Put build config into #{bundle_config}: #{ { without: without, retries: retries, jobs: jobs, frozen: frozen } }" do @@ -84,7 +78,7 @@ module BuildChef # Emit blank line to separate different tasks log.info(log_key) { "" } log.info(log_key) { "Properly installing git or path sourced gem #{gem_path} using rake install" } - shellout!("#{bundle_bin} exec #{rake_bin} install", env: chef_env, cwd: gem_path) + shellout!("#{bundle_bin} exec #{rake_bin} install --trace", env: chef_env, cwd: gem_path) end end end @@ -113,7 +107,7 @@ module BuildChef end # Find the installed chef gem by looking for lib/chef.rb - chef_gem = File.expand_path("../..", shellout!("#{gem_bin} which chef").stdout.chomp) + chef_gem = File.expand_path("../..", shellout!("#{gem_bin} which chef", env: chef_env).stdout.chomp) # Figure out the path to gemfile_util from there gemfile_util = Pathname.new(File.join(chef_gem, "tasks", "gemfile_util")) gemfile_util = gemfile_util.relative_path_from(Pathname.new(shared_gemfile).dirname) @@ -136,7 +130,10 @@ module BuildChef bundle "lock", env: shared_gemfile_env # Freeze the location's Gemfile.lock. - create_bundle_config(shared_gemfile, frozen: true) + # TODO Windows cannot be frozen, because Bundler doesn't understand platform-specific + # versions. However, on Windows we have explicit version pins for most things, so + # we will *probably* get the exact versions of everything we want. + create_bundle_config(shared_gemfile, frozen: !windows?) # Clear the now-unnecessary git caches, cached gems, and git-checked-out gems block "Delete bundler git cache and git installs" do |