Skip to content

Commit

Permalink
Remove external appliance dependencies and just include in the Gemfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Fryguy committed Feb 5, 2025
1 parent c096bf3 commit 457009d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
run: bin/before_install
- name: Set up Ruby
uses: ruby/setup-ruby@v1
env:
APPLIANCE: "true"
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
Expand Down
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,12 @@ group :web_socket, :manageiq_default do
gem "websocket-driver", "~>0.6.3", :require => false
end

if ENV["APPLIANCE"]
group :appliance, :optional => true do
gem "manageiq-appliance_console", "~>6.0", :require => false
end
end

### Start of gems excluded from the appliances.
# The gems listed below do not need to be packaged until we find it necessary or useful.
# Only add gems here that we do not need on an appliance.
Expand Down
12 changes: 1 addition & 11 deletions lib/tasks/release.rake
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,12 @@ task :release do
lock_release = root.join("Gemfile.lock.release")
if lock_release.exist?
gemfile_lock = lock_release.to_s.chomp(".release")
appliance_dependency = root.join("bundler.d/manageiq-appliance-dependencies.rb")

FileUtils.ln_s(lock_release, gemfile_lock, :force => true)
FileUtils.ln_s(root.join("../manageiq-appliance/manageiq-appliance-dependencies.rb"),
appliance_dependency, :force => true)

exit $?.exitstatus unless Bundler.unbundled_system({"BUNDLE_IGNORE_CONFIG" => "true", "APPLIANCE" => "true"}, "bundle lock --update --conservative --patch")

FileUtils.rm([appliance_dependency, gemfile_lock])
FileUtils.rm(gemfile_lock)

lock_content = lock_release.read
lock_release.write(lock_content.gsub("branch: #{branch}", "tag: #{version}"))
Expand Down Expand Up @@ -206,11 +203,6 @@ namespace :release do
end

begin
require "open-uri"
appliance_deps = URI.parse("https://raw.githubusercontent.com/ManageIQ/manageiq-appliance/#{branch}/manageiq-appliance-dependencies.rb").read
appliance_deps_file = local_bundler_d.join("manageiq_appliance_dependencies.rb")
File.write(appliance_deps_file, appliance_deps)

FileUtils.cp(root.join("Gemfile.lock.release"), root.join("Gemfile.lock"))

if update_gems.any?
Expand All @@ -235,8 +227,6 @@ namespace :release do
end

FileUtils.cp(root.join("Gemfile.lock"), root.join("Gemfile.lock.release"))
ensure
FileUtils.rm_f(appliance_deps_file)
end
end
end

0 comments on commit 457009d

Please sign in to comment.