From 457009d419f62d2b728e892a88d982799f0a4e20 Mon Sep 17 00:00:00 2001 From: Jason Frey Date: Wed, 5 Feb 2025 14:37:48 -0500 Subject: [PATCH] Remove external appliance dependencies and just include in the Gemfile --- .github/workflows/ci.yaml | 2 ++ Gemfile | 6 ++++++ lib/tasks/release.rake | 12 +----------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6dbeb4005bbc..97d42d93391f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/Gemfile b/Gemfile index e282d09d083f..1bfe1b6a5495 100644 --- a/Gemfile +++ b/Gemfile @@ -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. diff --git a/lib/tasks/release.rake b/lib/tasks/release.rake index 18dde6f1e03b..4565070a4463 100644 --- a/lib/tasks/release.rake +++ b/lib/tasks/release.rake @@ -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}")) @@ -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? @@ -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