Skip to content

Commit

Permalink
Merge pull request #417 from treydock/updates
Browse files Browse the repository at this point in the history
Support Puppet 8 and stdlib 9.x
  • Loading branch information
ghoneycutt committed Nov 15, 2023
2 parents 9b4f202 + c9f897e commit 27031c0
Show file tree
Hide file tree
Showing 24 changed files with 91 additions and 560 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,35 @@ jobs:
fail-fast: false
matrix:
include:
- ruby: 2.7.6
- ruby: 2.7.8
puppet: 7
fixtures: .fixtures.yml
allow_failure: false
- ruby: 2.7.6
- ruby: 2.7.8
puppet: 7
fixtures: .fixtures-latest.yml
allow_failure: true
- ruby: 3.2.2
puppet: 8
fixtures: .fixtures.yml
allow_failure: false
- ruby: 3.2.2
puppet: 8
fixtures: .fixtures-latest.yml
allow_failure: true
env:
BUNDLE_WITHOUT: system_tests:release
PUPPET_GEM_VERSION: "~> ${{ matrix.puppet }}.0"
FACTER_GEM_VERSION: "< 4.0"
FIXTURES_YML: ${{ matrix.fixtures }}
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }} fixtures=${{ matrix.fixtures }})
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
cache-version: 2
bundler: '2.1.0'
- name: Validate
run: bundle exec rake check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint
Expand All @@ -47,14 +55,15 @@ jobs:
fail-fast: false
matrix:
set:
- "debian-10"
- "centos-7"
- "rocky-8"
- "rocky-9"
- "ubuntu-1804"
- "el8"
- "el9"
- "debian-11"
- "ubuntu-2004"
- "ubuntu-2204"
- "el7"
puppet:
- "puppet7"
- "puppet8"
env:
BUNDLE_WITHOUT: development:release
BEAKER_debug: true
Expand All @@ -71,12 +80,13 @@ jobs:
sudo apt-get remove mysql-server --purge
sudo apt-get install apparmor-profiles
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
cache-version: 2
bundler: '2.1.0'
- name: Run tests
run: bundle exec rake beaker
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
cache-version: 2
bundler: '2.1.0'
- name: Build and Deploy
env:
Expand Down
27 changes: 18 additions & 9 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,27 @@
# See https://github.com/puppetlabs/pdk-templates/blob/main/config_defaults.yml
# for the default values.
---
.github/workflows/ci.yaml:
acceptance_matrix:
set:
- el7
- el8
- el9
- debian-11
- ubuntu-2004
- ubuntu-2204
puppet:
- puppet7
- puppet8
.github/workflows/release.yaml:
username: ghoneycutt
spec/spec_helper.rb:
coverage_report: true
minimum_code_coverage_percentage: 100
hiera_config: spec/hiera.yaml
appveyor.yml:
delete: true

.gitlab-ci.yml:
delete: true

.travis.yml:
delete: true

spec/spec_helper.rb:
coverage_report: true
minimum_code_coverage_percentage: 100
# add hiera data for testing
hiera_config: 'spec/fixtures/hiera/hiera.yaml'
mock_with: ':mocha'
12 changes: 6 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = ruby_version_segments[0..1].join('.')

group :development do
gem "voxpupuli-test", '5.4.1', require: false
gem "faraday", '~> 1.0', require: false
gem "github_changelog_generator", require: false
gem "puppet-blacksmith", require: false
gem "puppet-strings", require: false
gem "rubocop-performance", require: false
gem "voxpupuli-test", '6.0.0', require: false
gem "rubocop-performance", '~> 1.18', require: false
gem "faraday", '~> 1.0', require: false
gem "github_changelog_generator", require: false
gem "puppet-blacksmith", require: false
gem "puppet-strings", require: false
end
group :system_tests do
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 4.29')
Expand Down
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ PuppetLint.configuration.send('disable_manifest_whitespace_opening_brace_after')
PuppetLint.configuration.send('disable_relative')
PuppetLint.configuration.send('fail_on_warnings')


if Bundler.rubygems.find_name('github_changelog_generator').any?
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil?
Expand All @@ -56,7 +57,7 @@ if Bundler.rubygems.find_name('github_changelog_generator').any?
config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)."
config.add_pr_wo_labels = true
config.issues = false
config.merge_prefix = "### UNCATEGORIZED PRS; LABEL THEM ON GITHUB"
config.merge_prefix = "### Merged pull requests:"
config.configure_sections = {
"Changed" => {
"prefix" => "### Changed",
Expand Down
68 changes: 0 additions & 68 deletions data/os/Debian/10.yaml

This file was deleted.

74 changes: 0 additions & 74 deletions data/os/Ubuntu/18.04.yaml

This file was deleted.

12 changes: 5 additions & 7 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 8.0.0 < 9.0.0"
"version_requirement": ">= 8.0.0 < 10.0.0"
},
{
"name": "puppetlabs/concat",
"version_requirement": ">= 7.0.0 < 8.0.0"
"version_requirement": ">= 7.0.0 < 10.0.0"
},
{
"name": "puppetlabs/sshkeys_core",
Expand Down Expand Up @@ -43,7 +43,6 @@
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"10",
"11"
]
},
Expand Down Expand Up @@ -86,7 +85,6 @@
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"18.04",
"20.04",
"22.04"
]
Expand All @@ -95,11 +93,11 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 7.0.0 < 8.0.0"
"version_requirement": ">= 7.0.0 < 9.0.0"
}
],
"description": "Manage SSH",
"pdk-version": "2.6.1",
"pdk-version": "3.0.0",
"template-url": "https://github.com/tailored-automation/pdk-templates#main",
"template-ref": "heads/main-0-g37b4517"
"template-ref": "heads/main-0-g53868f7"
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
HOSTS:
debian10:
debian11:
roles:
- agent
platform: debian-10-amd64
platform: debian-11-amd64
hypervisor: docker
image: debian:10
image: debian:11
docker_preserve_image: true
docker_cmd:
- '/sbin/init'
Expand All @@ -14,11 +14,14 @@ HOSTS:
- '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_container_name: 'ssh-debian10'
docker_env:
- LANG=en_US.UTF-8
- LANGUAGE=en_US.UTF-8
- LC_ALL=en_US.UTF-8
docker_container_name: 'ssh-debian11'
CONFIG:
log_level: debug
type: foss
ssh:
password: root
auth_methods: ["password"]

Loading

0 comments on commit 27031c0

Please sign in to comment.