Skip to content

Commit

Permalink
Merge pull request #724 from voxpupuli/dropubuntu18
Browse files Browse the repository at this point in the history
Drop Ubuntu 18.04
  • Loading branch information
zilchms authored Sep 1, 2024
2 parents 095a407 + 8c6430a commit d7d80b6
Show file tree
Hide file tree
Showing 16 changed files with 107 additions and 24 deletions.
12 changes: 10 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,15 +245,23 @@ with:
BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker
```

or

```sh
BEAKER_PUPPET_COLLECTION=none BEAKER_setfile=archlinux-64 bundle exec rake beaker
```

This latter example will use the distribution's own version of Puppet.

You can replace the string `debian11` with any common operating system.
The following strings are known to work:

* ubuntu2004
* ubuntu2204
* debian11
* centos7
* centos8
* debian12
* centos9
* archlinux
* almalinux8
* almalinux9
* fedora36
Expand Down
3 changes: 3 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

skip-changelog:
- head-branch: ['^release-*', 'release']
42 changes: 42 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes

changelog:
exclude:
labels:
- duplicate
- invalid
- modulesync
- question
- skip-changelog
- wont-fix
- wontfix

categories:
- title: Breaking Changes 🛠
labels:
- backwards-incompatible

- title: New Features 🎉
labels:
- enhancement

- title: Bug Fixes 🐛
labels:
- bug

- title: Documentation Updates 📚
labels:
- documentation
- docs

- title: Dependency Updates ⬆️
labels:
- dependencies

- title: Other Changes
labels:
- "*"
17 changes: 17 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

name: "Pull Request Labeler"

on:
pull_request_target: {}

jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ jobs:
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
username: ${{ secrets.PUPPET_FORGE_USERNAME }}
api_key: ${{ secrets.PUPPET_FORGE_API_KEY }}

create-github-release:
name: Create GitHub Release
runs-on: ubuntu-latest
steps:
- name: Create GitHub release
uses: voxpupuli/gha-create-a-github-release@v1
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '9.0.0'
modulesync_config_version: '9.1.0'
3 changes: 3 additions & 0 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

--fail-on-warnings
--no-parameter_documentation-check
--no-parameter_types-check
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 8.0', :require => false
gem 'voxpupuli-test', '~> 9.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 4.0', :require => false
Expand Down
1 change: 0 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"18.04",
"20.04",
"22.04"
]
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/php_fpm_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
end

describe 'when called with no parameters' do
case facts[:osfamily]
case facts[:os]['family']
when 'Debian'
case facts[:operatingsystemrelease]
case facts[:os]['release']['major']
when '18.04'
it { is_expected.to contain_service('php7.2-fpm').with_ensure('running') }
when '22.04'
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/php_fpm_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

describe 'when called with no parameters' do
# rubocop:disable RSpec/RepeatedExample
case facts[:osfamily]
case facts[:os]['family']
when 'Debian'
case facts[:operatingsystemrelease]
case facts[:os]['release']['major']
when '18.04'
it { is_expected.to contain_package('php7.2-fpm').with_ensure('present') }
it { is_expected.to contain_service('php7.2-fpm').with_ensure('running') }
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/php_repo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
end

describe 'when configuring a package repo' do
case facts[:osfamily]
case facts[:os]['family']
when 'Debian'
case facts[:operatingsystem]
case facts[:os]['name']
when 'Debian'
it { is_expected.to contain_class('php::repo::debian') }
when 'Ubuntu'
Expand Down
22 changes: 11 additions & 11 deletions spec/classes/php_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@
end

describe 'when called with no parameters' do
case facts[:osfamily]
case facts[:os]['family']
when 'Suse', 'RedHat', 'CentOS'
it { is_expected.to contain_class('php::global') }
end

case facts[:osfamily]
case facts[:os]['family']
when 'Debian'
it { is_expected.not_to contain_class('php::global') }
it { is_expected.to contain_class('php::fpm') }
Expand Down Expand Up @@ -125,7 +125,7 @@

it { is_expected.to contain_php__extension('xml').with_ensure('absent') }

case facts[:osfamily]
case facts[:os]['family']
when 'Debian'
it { is_expected.to contain_package(php_cli_package).with_ensure('absent') }
it { is_expected.to contain_package(php_fpm_package).with_ensure('absent') }
Expand All @@ -143,17 +143,17 @@
package_prefix = 'myphp-'
let(:params) { { package_prefix: package_prefix } }

case facts[:osfamily]
case facts[:os]['family']
when 'Suse', 'RedHat', 'CentOS'
it { is_expected.to contain_class('php::global') }
end

case facts[:osfamily]
case facts[:os]['family']
when 'Debian', 'RedHat', 'CentOS'
it { is_expected.to contain_package("#{package_prefix}cli").with_ensure('present') }
end

case facts[:osfamily]
case facts[:os]['family']
when 'Debian'
it { is_expected.not_to contain_class('php::global') }
it { is_expected.to contain_class('php::fpm') }
Expand All @@ -179,7 +179,7 @@
it { is_expected.to contain_class('php::fpm').with(user: 'nginx') }
it { is_expected.to contain_php__fpm__pool('www').with(user: 'nginx') }

dstfile = case facts[:osfamily]
dstfile = case facts[:os]['family']
when 'Debian'
case facts[:os]['name']
when 'Debian'
Expand Down Expand Up @@ -224,7 +224,7 @@
it { is_expected.to contain_class('php::fpm').with(group: 'nginx') }
it { is_expected.to contain_php__fpm__pool('www').with(group: 'nginx') }

dstfile = case facts[:osfamily]
dstfile = case facts[:os]['family']
when 'Debian'
case facts[:os]['name']
when 'Debian'
Expand Down Expand Up @@ -276,7 +276,7 @@

it { is_expected.to contain_php__fpm__pool('www').with(apparmor_hat: 'www') }

dstfile = case facts[:osfamily]
dstfile = case facts[:os]['family']
when 'Debian'
case facts[:os]['name']
when 'Debian'
Expand Down Expand Up @@ -327,7 +327,7 @@
it { is_expected.not_to contain_class('php::composer') }
end

if facts[:osfamily] == 'RedHat' || facts[:osfamily] == 'CentOS' || facts[:os]['name'] == 'Ubuntu' || (facts[:os]['name'] == 'Debian' && facts[:os]['release']['major'].to_i < 12)
if facts[:os]['family'] == 'RedHat' || facts[:os]['family'] == 'CentOS' || facts[:os]['name'] == 'Ubuntu' || (facts[:os]['name'] == 'Debian' && facts[:os]['release']['major'].to_i < 12)
describe 'when called with flavor zend' do
zendphp_cli_package = case facts[:os]['name']
when 'Debian', 'Ubuntu'
Expand Down Expand Up @@ -355,7 +355,7 @@
end
end

if facts[:osfamily] == 'RedHat' || facts[:osfamily] == 'CentOS'
if facts[:os]['family'] == 'RedHat' || facts[:os]['family'] == 'CentOS'
describe 'when called with valid settings parameter types' do
let(:params) do
{
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/extension_rhscl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

describe 'php::extension' do
on_supported_os.each do |os, facts|
next unless facts[:osfamily] == 'RedHat' || facts[:osfamily] == 'CentOS'
next unless facts[:os]['family'] == 'RedHat' || facts[:os]['family'] == 'CentOS'

context "on #{os}" do
let :facts do
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/extension_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
end
let(:pre_condition) { 'include php' }

unless facts[:osfamily] == 'Suse' || facts[:osfamily] == 'FreeBSD' # FIXME: something is wrong on these
unless facts[:os]['family'] == 'Suse' || facts[:os]['family'] == 'FreeBSD' # FIXME: something is wrong on these
etcdir = case facts[:os]['name']
when 'Debian'
case facts[:os]['release']['major']
Expand Down
4 changes: 4 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

require 'voxpupuli/test/spec_helper'

RSpec.configure do |c|
c.facterdb_string_keys = false
end

add_mocked_facts!

if File.exist?(File.join(__dir__, 'default_module_facts.yml'))
Expand Down

0 comments on commit d7d80b6

Please sign in to comment.