Skip to content
Open
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
5 changes: 2 additions & 3 deletions lib/facter/jenkins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
Facter.add(:jenkins_plugins) do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For compatibility I toyed with the idea to create a structured jenkins fact where plugins is a key, but I had issues testing it properly and then had a lack of time. I also thought it would be good to reduce the number of entries.

Facter.add(:jenkins, type: :aggregate) do
  confine kernel: 'Linux'

  chunk :plugins do
    plugins = Puppet::Jenkins::Plugins.available
    plugins.transform_values { |plugin| plugin.slice(:plugin_version) }
  end
end

confine kernel: 'Linux'
setcode do
plugins = Puppet::Jenkins::Plugins.available
plugins.keys.sort.map { |plugin| "#{plugin} #{plugins[plugin][:plugin_version]}" }.join(', ')
Puppet::Jenkins::Plugins.available
end
end
end