Skip to content

Commit

Permalink
[puppetsync] Updates for Puppet 8 (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
silug authored Oct 12, 2023
1 parent a9b7953 commit d05d913
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 30 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/tag_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ jobs:
IS_PRERELASE: ${{ steps.tag-check.outputs.prerelease }}
run: |
echo "${RELEASE_MESSAGE}" > /tmp/.commit-msg.txt
args=(--file /tmp/.commit-msg.txt)
args=(-F /tmp/.commit-msg.txt)
[[ $IS_PRERELASE == yes ]] && args+=(--prerelease)
hub release create ${args[@]} "$TARGET_TAG"
gh release create ${args[@]} "$TARGET_TAG"
build-and-attach-rpms:
name: Trigger RPM release
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
* Wed Oct 11 2023 Steven Pritchard <[email protected]> - 4.19.0
- [puppetsync] Updates for Puppet 8
- These updates may include the following:
- Update Gemfile
- Add support for Puppet 8
- Drop support for Puppet 6
- Update module dependencies

* Tue Oct 03 2023 Steven Pritchard <[email protected]> - 4.18.0
- Add AlmaLinux 8 support
- Add support for stdlib 9
Expand Down
34 changes: 17 additions & 17 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@
# This file is automatically updated as part of a puppet module baseline.
# The next baseline sync will overwrite any local changes made to this file.
# ------------------------------------------------------------------------------
gem_sources = ENV.fetch('GEM_SERVERS','https://rubygems.org').split(/[, ]+/)
gem_sources = ENV.fetch('GEM_SERVERS', 'https://rubygems.org').split(%r{[, ]+})

ENV['PDK_DISABLE_ANALYTICS'] ||= 'true'

gem_sources.each { |gem_source| source gem_source }

group :test do
puppet_version = ENV['PUPPET_VERSION'] || '~> 7'
major_puppet_version = puppet_version.scan(/(\d+)(?:\.|\Z)/).flatten.first.to_i
gem 'rake'
gem 'puppet', puppet_version
gem 'rspec'
gem 'rspec-puppet'
puppet_version = ENV.fetch('PUPPET_VERSION', ['>= 7', '< 9'])
major_puppet_version = Array(puppet_version).first.scan(%r{(\d+)(?:\.|\Z)}).flatten.first.to_i
gem 'hiera-puppet-helper'
gem 'puppetlabs_spec_helper'
gem 'metadata-json-lint'
gem 'puppet-strings'
gem 'puppet-lint-trailing_comma-check', :require => false
gem 'simp-rspec-puppet-facts', ENV['SIMP_RSPEC_PUPPET_FACTS_VERSION'] || '~> 3.1'
gem 'simp-rake-helpers', ENV['SIMP_RAKE_HELPERS_VERSION'] || ['>= 5.12.1', '< 6']
gem( 'pdk', ENV['PDK_VERSION'] || '~> 2.0', :require => false) if major_puppet_version > 5
gem 'pathspec', '~> 0.2' if Gem::Requirement.create('< 2.6').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem('pdk', ENV.fetch('PDK_VERSION', ['>= 2.0', '< 4.0']), require: false) if major_puppet_version > 5
gem 'puppet', puppet_version
gem 'puppetlabs_spec_helper'
gem 'puppet-lint-trailing_comma-check', require: false
gem 'puppet-strings'
gem 'rake'
gem 'rspec'
gem 'rspec-puppet'
gem 'simp-rake-helpers', ENV.fetch('SIMP_RAKE_HELPERS_VERSION', ['>= 5.21.0', '< 6'])
gem 'simp-rspec-puppet-facts', ENV.fetch('SIMP_RSPEC_PUPPET_FACTS_VERSION', '~> 3.7')
end

group :development do
Expand All @@ -35,21 +35,21 @@ group :development do
end

group :system_tests do
gem 'bcrypt_pbkdf'
gem 'beaker'
gem 'beaker-rspec'
gem 'simp-beaker-helpers', ENV['SIMP_BEAKER_HELPERS_VERSION'] || ['>= 1.28.0', '< 2']
gem 'bcrypt_pbkdf'
gem 'simp-beaker-helpers', ENV.fetch('SIMP_BEAKER_HELPERS_VERSION', ['>= 1.32.1', '< 2'])
end

# Evaluate extra gemfiles if they exist
extra_gemfiles = [
ENV['EXTRA_GEMFILE'] || '',
ENV.fetch('EXTRA_GEMFILE', ''),
"#{__FILE__}.project",
"#{__FILE__}.local",
File.join(Dir.home, '.gemfile'),
]
extra_gemfiles.each do |gemfile|
if File.file?(gemfile) && File.readable?(gemfile)
eval(File.read(gemfile), binding)
eval(File.read(gemfile), binding) # rubocop:disable Security/Eval
end
end
18 changes: 9 additions & 9 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simp-simp",
"version": "4.18.0",
"version": "4.19.0",
"author": "SIMP Team",
"summary": "default profiles for core SIMP installations",
"license": "Apache-2.0",
Expand All @@ -21,7 +21,7 @@
},
{
"name": "puppet/augeasproviders_sysctl",
"version_requirement": ">= 2.2.0 < 4.0.0"
"version_requirement": ">= 2.4.0 < 4.0.0"
},
{
"name": "puppet/chrony",
Expand Down Expand Up @@ -85,7 +85,7 @@
},
{
"name": "simp/iptables",
"version_requirement": ">= 6.0.0 < 7.0.0"
"version_requirement": ">= 6.5.3 < 7.0.0"
},
{
"name": "simp/issue",
Expand All @@ -97,15 +97,15 @@
},
{
"name": "simp/pam",
"version_requirement": ">= 6.0.0 < 7.0.0"
"version_requirement": ">= 6.8.3 < 7.0.0"
},
{
"name": "simp/polkit",
"version_requirement": ">= 6.1.0 < 7.0.0"
},
{
"name": "simp/postfix",
"version_requirement": ">= 5.0.0 < 6.0.0"
"version_requirement": ">= 5.5.0 < 6.0.0"
},
{
"name": "simp/pupmod",
Expand All @@ -121,7 +121,7 @@
},
{
"name": "simp/rsync",
"version_requirement": ">= 6.0.0 < 7.0.0"
"version_requirement": ">= 6.1.1 < 7.0.0"
},
{
"name": "simp/selinux",
Expand All @@ -145,19 +145,19 @@
},
{
"name": "simp/simplib",
"version_requirement": ">= 4.5.0 < 5.0.0"
"version_requirement": ">= 4.9.0 < 5.0.0"
},
{
"name": "simp/ssh",
"version_requirement": ">= 6.5.1 < 7.0.0"
"version_requirement": ">= 6.11.0 < 7.0.0"
},
{
"name": "simp/sssd",
"version_requirement": ">= 7.0.0 < 8.0.0"
},
{
"name": "simp/sudo",
"version_requirement": ">= 5.1.0 < 6.0.0"
"version_requirement": ">= 5.1.1 < 6.0.0"
},
{
"name": "simp/sudosh",
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ def set_hieradata(hieradata)
}
}

c.trusted_server_facts = true
c.trusted_server_facts = true if c.respond_to?(:trusted_server_facts)

c.mock_framework = :rspec
c.mock_with :mocha

c.module_path = File.join(fixture_path, 'modules')
c.manifest_dir = File.join(fixture_path, 'manifests')
c.manifest_dir = File.join(fixture_path, 'manifests') if c.respond_to?(:manifest_dir)

c.hiera_config = File.join(fixture_path,'hieradata','hiera.yaml')

Expand Down

0 comments on commit d05d913

Please sign in to comment.