Skip to content

Commit

Permalink
Support Debian 11 (#241)
Browse files Browse the repository at this point in the history
* Support Debian 11

fixes #240

* Also test Debian 11

* Use newer postgresql module during unit tests

* Update Gems

* Fix unit and acceptance tests

* Fix rubocop

Co-authored-by: Trey Dockendorf <[email protected]>
  • Loading branch information
vilhelmprytz and treydock authored Apr 25, 2022
1 parent e9a1a5e commit 569632d
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fixtures:
ref: v10.3.0
postgresql:
repo: https://github.com/puppetlabs/puppetlabs-postgresql.git
ref: v6.6.0
ref: v7.4.0
java:
repo: https://github.com/puppetlabs/puppetlabs-java.git
ref: v7.3.0
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ jobs:
fail-fast: false
matrix:
include:
- ruby: 2.5.7
- ruby: 2.5.9
puppet: 6
fixtures: .fixtures.yml
allow_failure: false
- ruby: 2.7.0
- ruby: 2.7.6
puppet: 7
fixtures: .fixtures.yml
allow_failure: false
- ruby: 2.5.7
- ruby: 2.5.9
puppet: 6
fixtures: .fixtures-latest.yml
allow_failure: true
- ruby: 2.7.0
- ruby: 2.7.6
puppet: 7
fixtures: .fixtures-latest.yml
allow_failure: true
Expand Down Expand Up @@ -59,6 +59,7 @@ jobs:
- "rocky-8"
- "debian-9"
- "debian-10"
- "debian-11"
- "ubuntu-1804"
- "ubuntu-2004"
puppet:
Expand Down
26 changes: 2 additions & 24 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
require:
- rubocop-rspec
- rubocop-i18n
AllCops:
DisplayCopNames: true
TargetRubyVersion: '2.1'
TargetRubyVersion: '2.5'
Include:
- "./**/*.rb"
Exclude:
Expand All @@ -21,13 +20,6 @@ AllCops:
Metrics/LineLength:
Description: People have wide screens, use them.
Max: 200
GetText:
Enabled: false
GetText/DecorateString:
Description: We don't want to decorate test output.
Exclude:
- spec/**/*
Enabled: false
RSpec/BeforeAfterAll:
Description: Beware of using after(:all) as it may cause state to leak between tests.
A necessary evil in acceptance testing.
Expand All @@ -40,10 +32,6 @@ Style/BlockDelimiters:
Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
be consistent then.
EnforcedStyle: braces_for_chaining
Style/BracesAroundHashParameters:
Description: Braces are required by Ruby 2.7. Cop removed from RuboCop v0.80.0.
See https://github.com/rubocop-hq/rubocop/pull/7643
Enabled: true
Style/ClassAndModuleChildren:
Description: Compact style reduces the required amount of indentation.
EnforcedStyle: compact
Expand Down Expand Up @@ -72,10 +60,6 @@ Style/TrailingCommaInArguments:
Description: Prefer always trailing comma on multiline argument lists. This makes
diffs, and re-ordering nicer.
EnforcedStyleForMultiline: comma
Style/TrailingCommaInLiteral:
Description: Prefer always trailing comma on multiline literals. This makes diffs,
and re-ordering nicer.
EnforcedStyleForMultiline: comma
Style/SymbolArray:
Description: Using percent style obscures symbolic intent of array's contents.
EnforcedStyle: brackets
Expand All @@ -93,15 +77,9 @@ Style/MethodCalledOnDoEndBlock:
Enabled: true
Style/StringMethods:
Enabled: true
GetText/DecorateFunctionMessage:
Enabled: false
GetText/DecorateStringFormattingUsingInterpolation:
Enabled: false
GetText/DecorateStringFormattingUsingPercent:
Enabled: false
Layout/EndOfLine:
Enabled: false
Layout/IndentHeredoc:
Layout/HeredocIndentation:
Enabled: false
Metrics/AbcSize:
Enabled: false
Expand Down
8 changes: 6 additions & 2 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
.github/workflows/ci.yaml:
unit_name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }} fixtures=${{ matrix.fixtures }})
unit_includes:
- ruby: '2.5.7'
- ruby: '2.5.9'
puppet: '6'
fixtures: .fixtures-latest.yml
allow_failure: true
- ruby: '2.7.0'
- ruby: '2.7.6'
puppet: '7'
fixtures: .fixtures-latest.yml
allow_failure: true
Expand All @@ -17,6 +17,7 @@
- rocky-8
- debian-9
- debian-10
- debian-11
- ubuntu-1804
- ubuntu-2004
puppet:
Expand Down Expand Up @@ -86,6 +87,9 @@ appveyor.yml:
spec/acceptance/nodesets/debian-10.yml:
packages:
- iproute2
spec/acceptance/nodesets/debian-11.yml:
packages:
- iproute2
spec/acceptance/nodesets/ubuntu-1804.yml:
packages:
- iproute2
Expand Down
16 changes: 9 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,25 @@ group :development do
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-posix-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-posix-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-lint-param-docs", require: false
gem "github_changelog_generator", require: false
end
group :system_tests do
gem "puppet-module-posix-system-r#{minor_version}", '~> 0.5', require: false, platforms: [:ruby]
gem "puppet-module-win-system-r#{minor_version}", '~> 0.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 4.0')
gem "puppet-module-posix-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
gem "puppet-module-win-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 4.29')
gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')
gem "beaker-pe", require: false
gem "beaker-hostgenerator"
gem "beaker-rspec"
gem "beaker-docker", *location_for(ENV['BEAKER_DOCKER_VERSION'] || '~> 0.7.0')
gem "beaker-puppet"
gem "beaker-puppet_install_helper", require: false
gem "beaker-module_install_helper", require: false
end

puppet_version = ENV['PUPPET_GEM_VERSION']
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -565,5 +565,6 @@ This module has been tested on:
* RedHat/CentOS 8 x86_64
* Debian 9 x86_64
* Debian 10 x86_64
* Debian 11 x86_64
* Ubuntu 18.04 x86_64
* Ubuntu 20.04 x86_64
5 changes: 3 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
"operatingsystem": "Debian",
"operatingsystemrelease": [
"9",
"10"
"10",
"11"
]
},
{
Expand All @@ -88,5 +89,5 @@
],
"pdk-version": "2.1.0",
"template-url": "https://github.com/treydock/pdk-templates.git#master",
"template-ref": "heads/master-0-g3b13f94"
"template-ref": "heads/master-0-g14db8ad"
}
28 changes: 28 additions & 0 deletions spec/acceptance/nodesets/debian-11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
HOSTS:
debian11:
roles:
- agent
platform: debian-11-amd64
hypervisor: docker
image: debian:11
docker_preserve_image: true
docker_cmd:
- '/sbin/init'
docker_image_commands:
- 'apt-get install -y wget net-tools systemd-sysv locales apt-transport-https ca-certificates iproute2'
- 'echo "LC_ALL=en_US.UTF-8" >> /etc/environment'
- 'echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen'
- 'echo "LANG=en_US.UTF-8" > /etc/locale.conf'
- 'locale-gen en_US.UTF-8'
docker_env:
- LANG=en_US.UTF-8
- LANGUAGE=en_US.UTF-8
- LC_ALL=en_US.UTF-8
docker_container_name: 'keycloak-debian11'
CONFIG:
log_level: debug
type: foss
ssh:
password: root
auth_methods: ["password"]

2 changes: 1 addition & 1 deletion spec/acceptance/nodesets/rocky-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ HOSTS:
docker_image_commands:
- 'dnf install -y dnf-utils'
- 'dnf config-manager --set-enabled powertools'
- 'dnf install -y wget which cronie iproute initscripts langpacks-en glibc-all-langpacks'
- 'dnf install -y wget which cronie iproute initscripts langpacks-en glibc-all-langpacks cpio'
docker_env:
- LANG=en_US.UTF-8
- LANGUAGE=en_US.UTF-8
Expand Down

0 comments on commit 569632d

Please sign in to comment.