Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Puppet 8 #40

Merged
merged 8 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 13 additions & 81 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,86 +1,18 @@
# DO NOT EDIT THIS FILE!
# This file is managed by ModuleSync.
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

name: CI

on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
on: pull_request

jobs:
setup_matrix:
name: 'Setup Test Matrix'
runs-on: ubuntu-latest
outputs:
beaker_setfiles: ${{ steps.get-outputs.outputs.beaker_setfiles }}
puppet_major_versions: ${{ steps.get-outputs.outputs.puppet_major_versions }}
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
env:
BUNDLE_WITHOUT: development:test:release
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Run rake validate
run: bundle exec rake validate
- name: Setup Test Matrix
id: get-outputs
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false

unit:
needs: setup_matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}}
env:
BUNDLE_WITHOUT: development:system_tests:release
PUPPET_VERSION: "~> ${{ matrix.puppet }}.0"
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }})
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake
concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true

acceptance:
needs: setup_matrix
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: development:test:release
strategy:
fail-fast: false
matrix:
setfile: ${{fromJson(needs.setup_matrix.outputs.beaker_setfiles)}}
puppet: ${{fromJson(needs.setup_matrix.outputs.puppet_major_versions)}}
name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
steps:
- name: Enable IPv6 on docker
run: |
echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
sudo service docker restart
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Run tests
run: bundle exec rake beaker
env:
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }}
BEAKER_setfile: ${{ matrix.setfile.value }}
jobs:
puppet:
name: Puppet
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1
with:
pidfile_workaround: 'false'
35 changes: 14 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

name: Release

on:
push:
tags:
- '*'

env:
BUNDLE_WITHOUT: development:test:system_tests

jobs:
deploy:
name: 'deploy to forge'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Build and Deploy
env:
# Configure secrets here:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}'
BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}'
run: bundle exec rake module:push
release:
name: Release
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v1
with:
allowed_owner: 'opus-codium'
secrets:
# Configure secrets here:
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
username: ${{ secrets.PUPPET_FORGE_USERNAME }}
api_key: ${{ secrets.PUPPET_FORGE_API_KEY }}
26 changes: 23 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
.bundle
Gemfile.lock
spec/fixtures
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

/pkg/
/Gemfile.lock
/Gemfile.local
/vendor/
/.vendor/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/.vagrant/
/.bundle/
/.ruby-version
/coverage/
/log/
/.idea/
/.dependencies/
/.librarian/
/Puppetfile.lock
*.iml
.*.sw?
/.yardoc/
/Guardfile
37 changes: 37 additions & 0 deletions .pmtignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

/docs/
/pkg/
/Gemfile
/Gemfile.lock
/Gemfile.local
/vendor/
/.vendor/
/spec/
/Rakefile
/.vagrant/
/.bundle/
/.ruby-version
/coverage/
/log/
/.idea/
/.dependencies/
/.github/
/.librarian/
/Puppetfile.lock
*.iml
/.editorconfig
/.fixtures.yml
/.gitignore
/.msync.yml
/.overcommit.yml
/.pmtignore
/.rspec
/.rspec_parallel
/.rubocop.yml
/.sync.yml
.*.sw?
/.yardoc/
/.yardopts
/Dockerfile
3 changes: 3 additions & 0 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--fail-on-warnings
--no-parameter_documentation-check
--no-parameter_types-check
5 changes: 3 additions & 2 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# DO NOT EDIT THIS FILE!
# This file is managed by ModuleSync.
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

--format documentation
--color
4 changes: 4 additions & 0 deletions .rspec_parallel
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

--format progress
19 changes: 3 additions & 16 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
---
# DO NOT EDIT THIS FILE!
# This file is managed by ModuleSync.
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

inherit_gem:
voxpupuli-test: rubocop.yml
AllCops:
TargetRubyVersion: "2.4"
Metrics/LineLength:
Description: People have wide screens, use them.
Max: 200
Metrics/BlockLength:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Style/RegexpLiteral:
Enabled: false
Style/TrailingCommaInArguments:
Description: Be consistent with Puppet's style
EnforcedStyleForMultiline: comma
2 changes: 0 additions & 2 deletions .yardopts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# DO NOT EDIT THIS FILE!
# This file is managed by ModuleSync.
--fail-on-warning
29 changes: 17 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
# DO NOT EDIT THIS FILE!
# This file is managed by ModuleSync.
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

source ENV['GEM_SOURCE'] || "https://rubygems.org"
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 2.1', :require => false
gem 'simplecov-console', :require => false
gem 'voxpupuli-test', '~> 7.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 3.0', :require => false
end

group :development do
gem 'guard-rake', :require => false
gem 'overcommit', '>= 0.39.1', :require => false
end

group :system_tests do
gem 'puppet_metadata', '~> 0.3.0', :require => false
gem 'voxpupuli-acceptance', :require => false
gem 'voxpupuli-acceptance', '~> 2.0', :require => false
end

group :release do
gem 'github_changelog_generator', '>= 1.16.1', :require => false
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false
gem 'puppet-strings', '>= 2.2', :require => false
gem 'voxpupuli-release', '~> 3.0', :require => false
gem 'faraday-retry', '~> 2.1', :require => false
end
gem 'puppetlabs_spec_helper', '~> 2.0', :require => false

gem 'rake', :require => false
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]

puppetversion = ENV['PUPPET_VERSION'] || '~> 6.0'
puppetversion = ENV['PUPPET_GEM_VERSION'] || '~> 7.24'
gem 'puppet', puppetversion, :require => false, :groups => [:test]

# vim: syntax=ruby
Loading