Skip to content

Commit 7604155

Browse files
authored
[puppetsync] Updates for Puppet 8 (#28)
1 parent de61c1e commit 7604155

File tree

7 files changed

+41
-27
lines changed

7 files changed

+41
-27
lines changed

.github/workflows/tag_deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ jobs:
120120
IS_PRERELASE: ${{ steps.tag-check.outputs.prerelease }}
121121
run: |
122122
echo "${RELEASE_MESSAGE}" > /tmp/.commit-msg.txt
123-
args=(--file /tmp/.commit-msg.txt)
123+
args=(-F /tmp/.commit-msg.txt)
124124
[[ $IS_PRERELASE == yes ]] && args+=(--prerelease)
125125
126-
hub release create ${args[@]} "$TARGET_TAG"
126+
gh release create ${args[@]} "$TARGET_TAG"
127127
128128
build-and-attach-rpms:
129129
name: Trigger RPM release

CHANGELOG

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
* Wed Oct 11 2023 Steven Pritchard <steve@sicura.us> - 0.5.0
2+
- [puppetsync] Updates for Puppet 8
3+
- These updates may include the following:
4+
- Update Gemfile
5+
- Add support for Puppet 8
6+
- Drop support for Puppet 6
7+
- Update module dependencies
8+
19
* Wed Aug 23 2023 Steven Pritchard <steve@sicura.us> - 0.4.0
210
- Add AlmaLinux 8 support
311

Gemfile

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@
44
# This file is automatically updated as part of a puppet module baseline.
55
# The next baseline sync will overwrite any local changes made to this file.
66
# ------------------------------------------------------------------------------
7-
gem_sources = ENV.fetch('GEM_SERVERS','https://rubygems.org').split(/[, ]+/)
7+
gem_sources = ENV.fetch('GEM_SERVERS', 'https://rubygems.org').split(%r{[, ]+})
88

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

1111
gem_sources.each { |gem_source| source gem_source }
1212

1313
group :test do
14-
puppet_version = ENV['PUPPET_VERSION'] || '~> 7'
15-
major_puppet_version = puppet_version.scan(/(\d+)(?:\.|\Z)/).flatten.first.to_i
16-
gem 'rake'
17-
gem 'puppet', puppet_version
18-
gem 'rspec'
19-
gem 'rspec-puppet'
14+
puppet_version = ENV.fetch('PUPPET_VERSION', ['>= 7', '< 9'])
15+
major_puppet_version = Array(puppet_version).first.scan(%r{(\d+)(?:\.|\Z)}).flatten.first.to_i
2016
gem 'hiera-puppet-helper'
21-
gem 'puppetlabs_spec_helper'
2217
gem 'metadata-json-lint'
23-
gem 'puppet-strings'
24-
gem 'puppet-lint-trailing_comma-check', :require => false
25-
gem 'simp-rspec-puppet-facts', ENV['SIMP_RSPEC_PUPPET_FACTS_VERSION'] || '~> 3.1'
26-
gem 'simp-rake-helpers', ENV['SIMP_RAKE_HELPERS_VERSION'] || ['>= 5.12.1', '< 6']
27-
gem( 'pdk', ENV['PDK_VERSION'] || '~> 2.0', :require => false) if major_puppet_version > 5
2818
gem 'pathspec', '~> 0.2' if Gem::Requirement.create('< 2.6').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
19+
gem('pdk', ENV.fetch('PDK_VERSION', ['>= 2.0', '< 4.0']), require: false) if major_puppet_version > 5
20+
gem 'puppet', puppet_version
21+
gem 'puppetlabs_spec_helper'
22+
gem 'puppet-lint-trailing_comma-check', require: false
23+
gem 'puppet-strings'
24+
gem 'rake'
25+
gem 'rspec'
26+
gem 'rspec-puppet'
27+
gem 'simp-rake-helpers', ENV.fetch('SIMP_RAKE_HELPERS_VERSION', ['>= 5.21.0', '< 6'])
28+
gem 'simp-rspec-puppet-facts', ENV.fetch('SIMP_RSPEC_PUPPET_FACTS_VERSION', '~> 3.7')
2929
end
3030

3131
group :development do
@@ -35,21 +35,21 @@ group :development do
3535
end
3636

3737
group :system_tests do
38+
gem 'bcrypt_pbkdf'
3839
gem 'beaker'
3940
gem 'beaker-rspec'
40-
gem 'simp-beaker-helpers', ENV['SIMP_BEAKER_HELPERS_VERSION'] || ['>= 1.28.0', '< 2']
41-
gem 'bcrypt_pbkdf'
41+
gem 'simp-beaker-helpers', ENV.fetch('SIMP_BEAKER_HELPERS_VERSION', ['>= 1.32.1', '< 2'])
4242
end
4343

4444
# Evaluate extra gemfiles if they exist
4545
extra_gemfiles = [
46-
ENV['EXTRA_GEMFILE'] || '',
46+
ENV.fetch('EXTRA_GEMFILE', ''),
4747
"#{__FILE__}.project",
4848
"#{__FILE__}.local",
4949
File.join(Dir.home, '.gemfile'),
5050
]
5151
extra_gemfiles.each do |gemfile|
5252
if File.file?(gemfile) && File.readable?(gemfile)
53-
eval(File.read(gemfile), binding)
53+
eval(File.read(gemfile), binding) # rubocop:disable Security/Eval
5454
end
5555
end

data/os/AlmaLinux.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
ds389::install::package_list:
3+
- 389-ds-base

data/os/Rocky.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
ds389::install::package_list:
3+
- 389-ds-base

metadata.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simp-ds389",
3-
"version": "0.4.0",
3+
"version": "0.5.0",
44
"author": "SIMP Team",
55
"summary": "Management of 389 Directory Server",
66
"license": "Apache-2.0",
@@ -10,30 +10,30 @@
1010
"dependencies": [
1111
{
1212
"name": "puppet/systemd",
13-
"version_requirement": ">= 4.0.2 < 6.0.0"
13+
"version_requirement": ">= 4.0.2 < 7.0.0"
1414
},
1515
{
1616
"name": "simp/simplib",
17-
"version_requirement": ">= 4.4.1 < 5.0.0"
17+
"version_requirement": ">= 4.9.0 < 5.0.0"
1818
},
1919
{
2020
"name": "puppetlabs/stdlib",
21-
"version_requirement": ">= 8.0.0 < 9.0.0"
21+
"version_requirement": ">= 8.0.0 < 10.0.0"
2222
}
2323
],
2424
"simp": {
2525
"optional_dependencies": [
2626
{
2727
"name": "simp/pki",
28-
"version_requirement": ">= 6.0.0 < 7.0.0"
28+
"version_requirement": ">= 6.2.0 < 7.0.0"
2929
},
3030
{
3131
"name": "simp/selinux",
3232
"version_requirement": ">= 2.6.1 < 3.0.0"
3333
},
3434
{
3535
"name": "simp/vox_selinux",
36-
"version_requirement": ">= 1.6.1 < 4.0.0"
36+
"version_requirement": ">= 3.1.0 < 4.0.0"
3737
},
3838
{
3939
"name": "puppet/selinux",
@@ -76,7 +76,7 @@
7676
"requirements": [
7777
{
7878
"name": "puppet",
79-
"version_requirement": ">= 6.22.1 < 8.0.0"
79+
"version_requirement": ">= 7.0.0 < 9.0.0"
8080
}
8181
],
8282
"pdk-version": "1.18.0",

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def set_hieradata(hieradata)
9494
c.mock_with :rspec
9595

9696
c.module_path = File.join(fixture_path, 'modules')
97-
c.manifest_dir = File.join(fixture_path, 'manifests')
97+
c.manifest_dir = File.join(fixture_path, 'manifests') if c.respond_to?(:manifest_dir)
9898

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

0 commit comments

Comments
 (0)