Skip to content

Commit e7817b6

Browse files
bastelfreakwyardley
authored andcommitted
modulesync 5.2.0
1 parent 326a63c commit e7817b6

File tree

9 files changed

+33
-115
lines changed

9 files changed

+33
-115
lines changed

.github/CONTRIBUTING.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ If you have Ruby 2.x or want a specific version of Puppet,
124124
you must set an environment variable such as:
125125

126126
```sh
127-
export PUPPET_VERSION="~> 5.5.6"
127+
export PUPPET_GEM_VERSION="~> 5.5.6"
128128
```
129129

130130
You can install all needed gems for spec tests into the modules directory by
@@ -232,17 +232,16 @@ simple tests against it after applying the module. You can run this
232232
with:
233233

234234
```sh
235-
BEAKER_setfile=debian10-x64 bundle exec rake beaker
235+
BEAKER_setfile=debian11-64 bundle exec rake beaker
236236
```
237237

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

241-
* ubuntu1604
242241
* ubuntu1804
243242
* ubuntu2004
244-
* debian9
245243
* debian10
244+
* debian11
246245
* centos7
247246
* centos8
248247

.github/workflows/ci.yml

Lines changed: 6 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -7,84 +7,12 @@ name: CI
77
on: pull_request
88

99
concurrency:
10-
group: ${{ github.head_ref }}
10+
group: ${{ github.ref_name }}
1111
cancel-in-progress: true
1212

1313
jobs:
14-
setup_matrix:
15-
name: 'Setup Test Matrix'
16-
runs-on: ubuntu-latest
17-
timeout-minutes: 40
18-
outputs:
19-
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
20-
github_action_test_matrix: ${{ steps.get-outputs.outputs.github_action_test_matrix }}
21-
env:
22-
BUNDLE_WITHOUT: development:system_tests:release
23-
steps:
24-
- uses: actions/checkout@v2
25-
- name: Setup ruby
26-
uses: ruby/setup-ruby@v1
27-
with:
28-
ruby-version: '3.0'
29-
bundler-cache: true
30-
- name: Run static validations
31-
run: bundle exec rake validate lint check
32-
- name: Run rake rubocop
33-
run: bundle exec rake rubocop
34-
- name: Setup Test Matrix
35-
id: get-outputs
36-
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false
37-
38-
unit:
39-
needs: setup_matrix
40-
runs-on: ubuntu-latest
41-
timeout-minutes: 40
42-
strategy:
43-
fail-fast: false
44-
matrix:
45-
include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}}
46-
env:
47-
BUNDLE_WITHOUT: development:system_tests:release
48-
PUPPET_VERSION: "~> ${{ matrix.puppet }}.0"
49-
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }})
50-
steps:
51-
- uses: actions/checkout@v2
52-
- name: Setup ruby
53-
uses: ruby/setup-ruby@v1
54-
with:
55-
ruby-version: ${{ matrix.ruby }}
56-
bundler-cache: true
57-
- name: Run tests
58-
run: bundle exec rake parallel_spec
59-
60-
acceptance:
61-
needs: setup_matrix
62-
runs-on: ubuntu-latest
63-
env:
64-
BUNDLE_WITHOUT: development:test:release
65-
strategy:
66-
fail-fast: false
67-
matrix:
68-
include: ${{fromJson(needs.setup_matrix.outputs.github_action_test_matrix)}}
69-
name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
70-
steps:
71-
- uses: actions/checkout@v2
72-
- name: Setup ruby
73-
uses: ruby/setup-ruby@v1
74-
with:
75-
ruby-version: '3.0'
76-
bundler-cache: true
77-
- name: Run tests
78-
run: bundle exec rake beaker
79-
env:
80-
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }}
81-
BEAKER_setfile: ${{ matrix.setfile.value }}
82-
83-
tests:
84-
needs:
85-
- unit
86-
- acceptance
87-
runs-on: ubuntu-latest
88-
name: Test suite
89-
steps:
90-
- run: echo Test suite completed
14+
puppet:
15+
name: Puppet
16+
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1
17+
with:
18+
pidfile_workaround: 'false'

.github/workflows/release.yml

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,14 @@ on:
99
tags:
1010
- '*'
1111

12-
env:
13-
BUNDLE_WITHOUT: development:test:system_tests
14-
1512
jobs:
16-
deploy:
17-
name: 'deploy to forge'
18-
runs-on: ubuntu-latest
19-
if: github.repository_owner == 'voxpupuli'
20-
steps:
21-
- name: Checkout repository
22-
uses: actions/checkout@v2
23-
- name: Setup Ruby
24-
uses: ruby/setup-ruby@v1
25-
with:
26-
ruby-version: '2.7'
27-
bundler-cache: true
28-
- name: Build and Deploy
29-
env:
30-
# Configure secrets here:
31-
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
32-
BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}'
33-
BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}'
34-
run: bundle exec rake module:push
13+
release:
14+
name: Release
15+
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v1
16+
with:
17+
allowed_owner: 'voxpupuli'
18+
secrets:
19+
# Configure secrets here:
20+
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
21+
username: ${{ secrets.PUPPET_FORGE_USERNAME }}
22+
api_key: ${{ secrets.PUPPET_FORGE_API_KEY }}

.msync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Managed by modulesync - DO NOT EDIT
33
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
44

5-
modulesync_config_version: '4.2.0'
5+
modulesync_config_version: '5.2.0'

.puppet-lint.rc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--fail-on-warnings
2+
--no-parameter_documentation-check
3+
--no-parameter_types-check

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ WORKDIR /opt/puppet
88
# https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39
99
RUN mkdir -p /etc/sv
1010

11-
ARG PUPPET_VERSION="~> 6.0"
11+
ARG PUPPET_GEM_VERSION="~> 6.0"
1212
ARG PARALLEL_TEST_PROCESSORS=4
1313

1414
# Cache gems

Gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
source ENV['GEM_SOURCE'] || "https://rubygems.org"
55

66
group :test do
7-
gem 'voxpupuli-test', '~> 2.5', :require => false
7+
gem 'voxpupuli-test', '~> 5.0', :require => false
88
gem 'coveralls', :require => false
99
gem 'simplecov-console', :require => false
1010
gem 'puppet_metadata', '~> 1.0', :require => false
@@ -21,14 +21,14 @@ end
2121

2222
group :release do
2323
gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5'
24-
gem 'voxpupuli-release', '>= 1.0.2', :require => false
24+
gem 'voxpupuli-release', '>= 1.2.0', :require => false
2525
gem 'puppet-strings', '>= 2.2', :require => false
2626
end
2727

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

31-
puppetversion = ENV['PUPPET_VERSION'] || '>= 6.0'
31+
puppetversion = ENV['PUPPET_GEM_VERSION'] || '>= 6.0'
3232
gem 'puppet', puppetversion, :require => false, :groups => [:test]
3333

3434
# vim: syntax=ruby

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Managed by modulesync - DO NOT EDIT
22
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
33

4-
# Attempt to load voxupuli-test (which pulls in puppetlabs_spec_helper),
4+
# Attempt to load voxpupuli-test (which pulls in puppetlabs_spec_helper),
55
# otherwise attempt to load it directly.
66
begin
77
require 'voxpupuli/test/rake'

spec/spec_helper.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
# Managed by modulesync - DO NOT EDIT
24
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
35

@@ -7,16 +9,14 @@
79

810
# puppetlabs_spec_helper will set up coverage if the env variable is set.
911
# We want to do this if lib exists and it hasn't been explicitly set.
10-
ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../../lib', __FILE__))
12+
ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../lib', __dir__))
1113

1214
require 'voxpupuli/test/spec_helper'
1315

1416
if File.exist?(File.join(__dir__, 'default_module_facts.yml'))
1517
facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml')))
16-
if facts
17-
facts.each do |name, value|
18-
add_custom_fact name.to_sym, value
19-
end
18+
facts&.each do |name, value|
19+
add_custom_fact name.to_sym, value
2020
end
2121
end
2222

0 commit comments

Comments
 (0)