Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Allow updating all plugins when building the lockfile #22719

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/tasks/release.rake
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ namespace :release do
end

update_gems = ENV["UPDATE_GEMS"].to_s.split(" ")
if ENV["UPDATE_PLUGINS"]
require "vmdb/plugins"
update_gems += Vmdb::Plugins.repos.values
end

root = Pathname.new(__dir__).join("../..")

Expand Down
7 changes: 6 additions & 1 deletion lib/vmdb/plugins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def details
hash[engine] = {
:name => engine.name,
:version => version(engine),
:path => engine.root.to_s
:path => engine.root.to_s,
:repo => engine.root.to_s.match(%r{/gems/(.+)-\h+$})&.captures&.first || File.dirname(engine.root.to_s)
}
end
end
Expand All @@ -47,6 +48,10 @@ def versions
details.transform_values { |v| v[:version] }
end

def repos
details.transform_values { |v| v[:repo] }
end

# Ansible content (roles) that come out-of-the-box, for use by both Automate
# and ansible-runner
def ansible_content
Expand Down
Loading