Skip to content

Commit

Permalink
Don't setup Gemfile.lock for plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Oct 11, 2023
1 parent c7e045b commit 9c56b7b
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions lib/manageiq/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def self.manageiq_plugin_update(plugin_root = nil, force_bundle_update: true)
ensure_config_files

puts "== Installing dependencies =="
setup_gemfile_lock if ci?

install_bundler(plugin_root)
bundle_config(plugin_root)
bundle_update(plugin_root, force: force_bundle_update)
Expand Down Expand Up @@ -74,17 +74,6 @@ def self.install_bundler(root = APP_ROOT)
system!("gem install bundler -v '#{bundler_version}' --conservative", :chdir => root)
end

def self.setup_gemfile_lock
# Gemfile.lock.release only applies to non-master branches and PRs to non-master branches
return unless ENV["GITHUB_REPOSITORY_OWNER"] == "ManageIQ" &&
ENV["GITHUB_BASE_REF"] != "master" && # PR to non-master branch
ENV["GITHUB_REF_NAME"] != "master" && # A non-master branch
!ENV["GITHUB_REF_NAME"].to_s.start_with?("dependabot/") # Dependabot makes branches in the core repo

raise "Missing Gemfile.lock.release" unless APP_ROOT.join("Gemfile.lock.release").file?
FileUtils.cp(APP_ROOT.join("Gemfile.lock.release"), APP_ROOT.join("Gemfile.lock"))
end

def self.bundle_config(root = APP_ROOT)
system!("bundle config set --local build.rugged --with-ssh", :chdir => root)
end
Expand Down

0 comments on commit 9c56b7b

Please sign in to comment.