diff --git a/README.md b/README.md index e7fa091..bd92fd8 100644 --- a/README.md +++ b/README.md @@ -572,9 +572,15 @@ When no facts are available for the specific facter/operating system combination ## Maintenance This gem uses information about puppet AIO component versions to build/test. -They are stored at `ext/puppet_agent_facter_versions.json`. If they are outdated, -the `puppet_versions:test` rake task will fail and they need to be updated. -This is as easy as running: `bundle exec rake puppet_versions:update` +They are stored at `ext/puppet_agent_facter_versions.json`. + +In the past we used `bundle exec rake puppet_versions:update` to update the file and `puppet_versions:test` to validate it. +This relied on information from the puppet forge. +With the 6.0.0 release we're switching to openvox. +The file is currently maintained by hand, because openvox doesn't offer an API yet to map agent releases to openfact releases. +It got also renamed from `ext/puppet_agent_facter_versions.json` -> `ext/openvox_agent_facter_versions.json`. + +**`ext/openvox_agent_facter_versions.json`now lists a mapping of openvox releases to openfact releases** ## License diff --git a/Rakefile b/Rakefile index 60ec2ca..6f34bfc 100644 --- a/Rakefile +++ b/Rakefile @@ -21,39 +21,14 @@ end namespace :puppet_versions do desc 'updates the vendored list of puppet versions & components' task :update do - require 'net/http' - require 'net/https' - require 'uri' - require 'json' - - uri = URI.parse('https://forgeapi.puppet.com/private/versions/puppet-agent') - http = Net::HTTP.new(uri.host, uri.port) - http.use_ssl = uri.scheme == 'https' - - request = Net::HTTP::Get.new(uri.request_uri) - response = http.request(request) - raise unless response.is_a?(Net::HTTPSuccess) - - data = JSON.parse(response.body).filter_map do |_, versions| - if !versions['puppet'].nil? && !versions['facter'].nil? - [versions['puppet'], versions['facter']] - end - end - data.sort_by! { |puppet, _facter| Gem::Version.new(puppet) }.reverse! - - File.write(PUPPET_VERSIONS_PATH, "#{JSON.pretty_generate(data.to_h)}\n") + warn 'The rake task is disabled since the 6.0.0 Release. Please see the README.md' + exit 1 end desc 'runs all tests and verifies vendored component list' task :test do - Rake::Task['puppet_versions:update'].invoke - - output = `git status --porcelain #{PUPPET_VERSIONS_PATH}` - unless output.strip.empty? - warn "#{PUPPET_VERSIONS_PATH} is out of date." - warn 'Run the puppet_versions:update task to update it and commit the changes.' - raise - end + warn 'The rake task is disabled since the 6.0.0 Release. Please see the README.md' + exit 1 end end diff --git a/ext/puppet_agent_facter_versions.json b/ext/puppet_agent_facter_versions.json index fc1c7e8..b78cc30 100644 --- a/ext/puppet_agent_facter_versions.json +++ b/ext/puppet_agent_facter_versions.json @@ -1,4 +1,17 @@ { + "8.23.1": "5.1.0", + "8.23.0": "5.1.0", + "8.22.1": "5.0.0", + "8.19.2": "4.11.0", + "8.19.1": "4.11.0", + "8.19.0": "4.11.0", + "8.18.1": "4.11.0", + "8.17.0": "4.11.0", + "8.16.0": "4.11.0", + "8.15.0": "4.11.0", + "8.14.0": "4.11.0", + "8.13.0": "4.11.0", + "8.12.1": "4.11.0", "8.12.0": "4.12.0", "8.11.0": "4.11.0", "8.10.0": "4.10.0",