Skip to content

Commit f786482

Browse files
authored
Merge pull request voxpupuli#1040 from voxpupuli/modulesync
Modulesync 5.2.0
2 parents 31950a7 + e68efdb commit f786482

File tree

106 files changed

+831
-676
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+831
-676
lines changed

.editorconfig

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# editorconfig.org
22

3-
# MANAGED BY MODULESYNC
3+
# Managed by modulesync - DO NOT EDIT
4+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
45

56
root = true
67

.github/CONTRIBUTING.md

+5-36
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ By participating in this project you agree to abide by its terms.
2525

2626
* Fork the repo.
2727
* Create a separate branch for your change.
28-
* We only take pull requests with passing tests, and documentation. [travis-ci](http://travis-ci.org) runs the tests for us. You can also execute them locally. This is explained [in a later section](#the-test-matrix).
28+
* We only take pull requests with passing tests, and documentation. [GitHub Actions](https://docs.github.com/en/actions) run the tests for us. You can also execute them locally. This is explained [in a later section](#the-test-matrix).
2929
* Checkout [our docs](https://voxpupuli.org/docs/reviewing_pr/) we use to review a module and the [official styleguide](https://puppet.com/docs/puppet/6.0/style_guide.html). They provide some guidance for new code that might help you before you submit a pull request.
3030
* Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, please add a test.
3131
* Squash your commits down into logical components. Make sure to rebase against our current master.
@@ -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="~> 6.1.0"
128128
```
129129

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

234234
```sh
235-
bundle exec rake beaker
236-
```
237-
238-
This will run the tests on the module's default nodeset. You can override the
239-
nodeset used, e.g.,
240-
241-
```sh
242-
BEAKER_set=centos-7-x64 bundle exec rake beaker
243-
```
244-
245-
There are default rake tasks for the various acceptance test modules, e.g.,
246-
247-
```sh
248-
bundle exec rake beaker:centos-7-x64
249-
bundle exec rake beaker:ssh:centos-7-x64
250-
```
251-
252-
If you don't want to have to recreate the virtual machine every time you can
253-
use `BEAKER_destroy=no` and `BEAKER_provision=no`. On the first run you will at
254-
least need `BEAKER_provision` set to yes (the default). The Vagrantfile for the
255-
created virtual machines will be in `.vagrant/beaker_vagrant_files`.
256-
257-
Beaker also supports docker containers. We also use that in our automated CI
258-
pipeline at [travis-ci](http://travis-ci.org). To use that instead of Vagrant:
259-
260-
```sh
261-
PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian10-64{hypervisor=docker} BEAKER_destroy=yes bundle exec rake beaker
235+
BEAKER_setfile=debian11-64 bundle exec rake beaker
262236
```
263237

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

267-
* ubuntu1604
268241
* ubuntu1804
269242
* ubuntu2004
270-
* debian9
271243
* debian10
244+
* debian11
272245
* centos7
273246
* centos8
274247

275-
The easiest way to debug in a docker container is to open a shell:
276-
277-
```sh
278-
docker exec -it -u root ${container_id_or_name} bash
279-
```
248+
For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests).
280249

281250
The source of this file is in our [modulesync_config](https://github.com/voxpupuli/modulesync_config/blob/master/moduleroot/.github/CONTRIBUTING.md.erb)
282251
repository.

.github/workflows/ci.yml

+13-70
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,18 @@
1+
---
2+
# Managed by modulesync - DO NOT EDIT
3+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
4+
15
name: CI
26

37
on: pull_request
48

5-
jobs:
6-
setup_matrix:
7-
name: 'Setup Test Matrix'
8-
runs-on: ubuntu-latest
9-
outputs:
10-
beaker_setfiles: ${{ steps.get-outputs.outputs.beaker_setfiles }}
11-
puppet_major_versions: ${{ steps.get-outputs.outputs.puppet_major_versions }}
12-
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
13-
env:
14-
BUNDLE_WITHOUT: development:test:release
15-
steps:
16-
- uses: actions/checkout@v2
17-
- name: Setup ruby
18-
uses: ruby/setup-ruby@v1
19-
with:
20-
ruby-version: '2.7'
21-
bundler-cache: true
22-
- name: Run rake validate
23-
run: bundle exec rake validate
24-
- name: Setup Test Matrix
25-
id: get-outputs
26-
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround CentOS
27-
28-
unit:
29-
needs: setup_matrix
30-
runs-on: ubuntu-latest
31-
strategy:
32-
fail-fast: false
33-
matrix:
34-
include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}}
35-
env:
36-
BUNDLE_WITHOUT: development:system_tests:release
37-
PUPPET_VERSION: "~> ${{ matrix.puppet }}.0"
38-
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }})
39-
steps:
40-
- uses: actions/checkout@v2
41-
- name: Setup ruby
42-
uses: ruby/setup-ruby@v1
43-
with:
44-
ruby-version: ${{ matrix.ruby }}
45-
bundler-cache: true
46-
- name: Run tests
47-
run: bundle exec rake
9+
concurrency:
10+
group: ${{ github.ref_name }}
11+
cancel-in-progress: true
4812

49-
acceptance:
50-
needs: setup_matrix
51-
runs-on: ubuntu-latest
52-
env:
53-
BUNDLE_WITHOUT: development:test:release
54-
strategy:
55-
fail-fast: false
56-
matrix:
57-
setfile: ${{fromJson(needs.setup_matrix.outputs.beaker_setfiles)}}
58-
puppet: ${{fromJson(needs.setup_matrix.outputs.puppet_major_versions)}}
59-
name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
60-
steps:
61-
- name: Enable IPv6 on docker
62-
run: |
63-
echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
64-
sudo service docker restart
65-
- uses: actions/checkout@v2
66-
- name: Setup ruby
67-
uses: ruby/setup-ruby@v1
68-
with:
69-
ruby-version: '2.7'
70-
bundler-cache: true
71-
- name: Run tests
72-
run: bundle exec rake beaker
73-
env:
74-
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }}
75-
BEAKER_setfile: ${{ matrix.setfile.value }}
13+
jobs:
14+
puppet:
15+
name: Puppet
16+
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1
17+
with:
18+
pidfile_workaround: 'CentOS'

.github/workflows/release.yml

+14-21
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,22 @@
1+
---
2+
# Managed by modulesync - DO NOT EDIT
3+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
4+
15
name: Release
26

37
on:
48
push:
59
tags:
610
- '*'
711

8-
env:
9-
BUNDLE_WITHOUT: development:test:system_tests
10-
1112
jobs:
12-
deploy:
13-
name: 'deploy to forge'
14-
runs-on: ubuntu-latest
15-
steps:
16-
- name: Checkout repository
17-
uses: actions/checkout@v2
18-
- name: Setup Ruby
19-
uses: ruby/setup-ruby@v1
20-
with:
21-
ruby-version: '2.7'
22-
bundler-cache: true
23-
- name: Build and Deploy
24-
env:
25-
# Configure secrets here:
26-
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
27-
BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}'
28-
BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}'
29-
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 }}

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Managed by modulesync - DO NOT EDIT
2+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
3+
14
pkg/
25
Gemfile.lock
36
Gemfile.local

.msync.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
---
2-
modulesync_config_version: '4.0.0'
2+
# Managed by modulesync - DO NOT EDIT
3+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
4+
5+
modulesync_config_version: '5.2.0'

.overcommit.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Managed by https://github.com/voxpupuli/modulesync_configs
1+
# Managed by modulesync - DO NOT EDIT
2+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
23
#
34
# Hooks are only enabled if you take action.
45
#

.pmtignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Managed by modulesync - DO NOT EDIT
2+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
3+
14
docs/
25
pkg/
36
Gemfile

.puppet-lint.rc

+3
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

.rspec

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
# Managed by modulesync - DO NOT EDIT
2+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
3+
14
--format documentation
25
--color

.rspec_parallel

+3
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
# Managed by modulesync - DO NOT EDIT
2+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
3+
14
--format progress

.rubocop.yml

+21
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,26 @@
22
inherit_gem:
33
voxpupuli-test: rubocop.yml
44

5+
Lint/ConstantDefinitionInBlock:
6+
Enabled: false
7+
8+
RSpec/ExpectInHook:
9+
Enabled: false
10+
11+
RSpec/LeakyConstantDeclaration:
12+
Enabled: false
13+
514
RSpec/MessageSpies:
615
Enabled: false
16+
17+
RSpec/MultipleMemoizedHelpers:
18+
Enabled: false
19+
20+
RSpec/StubbedMock:
21+
Enabled: false
22+
23+
Style/ClassVars:
24+
Enabled: false
25+
26+
Style/IfUnlessModifier:
27+
Enabled: false

.sync.yml

+2
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ spec/spec_helper.rb:
88
spec_overrides: "require 'rspec/its'"
99
.github/workflows/ci.yml:
1010
pidfile_workaround: CentOS
11+
.rubocop.yml:
12+
unmanaged: true

.yardopts

-2
This file was deleted.

Dockerfile

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
FROM ruby:2.5.3
1+
# MANAGED BY MODULESYNC
2+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
3+
4+
FROM ruby:2.7
25

36
WORKDIR /opt/puppet
47

58
# https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39
69
RUN mkdir -p /etc/sv
710

8-
ARG PUPPET_VERSION="~> 6.0"
11+
ARG PUPPET_GEM_VERSION="~> 6.0"
912
ARG PARALLEL_TEST_PROCESSORS=4
1013

1114
# Cache gems

Gemfile

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
source ENV['GEM_SOURCE'] || "https://rubygems.org"
1+
# Managed by modulesync - DO NOT EDIT
2+
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
3+
4+
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
25

36
group :test do
4-
gem 'voxpupuli-test', '~> 2.1', :require => false
5-
gem 'coveralls', :require => false
6-
gem 'simplecov-console', :require => false
7-
gem 'rspec-its', :require => false
8-
gem 'retries', :require => false
7+
gem 'voxpupuli-test', '~> 5.0', :require => false
8+
gem 'coveralls', :require => false
9+
gem 'simplecov-console', :require => false
10+
gem 'puppet_metadata', '~> 1.0', :require => false
11+
gem 'rspec-its', :require => false
12+
gem 'retries', :require => false
913
end
1014

1115
group :development do
@@ -14,22 +18,19 @@ group :development do
1418
end
1519

1620
group :system_tests do
17-
gem 'puppet_metadata', '~> 0.3.0', :require => false
18-
gem 'voxpupuli-acceptance', :require => false
21+
gem 'voxpupuli-acceptance', '~> 1.0', :require => false
1922
end
2023

2124
group :release do
22-
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/voxpupuli/github-changelog-generator', :branch => 'voxpupuli_essential_fixes'
23-
gem 'puppet-blacksmith', :require => false
24-
gem 'voxpupuli-release', :require => false
25-
gem 'puppet-strings', '>= 2.2', :require => false
25+
gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5'
26+
gem 'voxpupuli-release', '>= 1.2.0', :require => false
27+
gem 'puppet-strings', '>= 2.2', :require => false
2628
end
2729

28-
gem 'puppetlabs_spec_helper', '~> 2.0', :require => false
2930
gem 'rake', :require => false
3031
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]
3132

32-
puppetversion = ENV['PUPPET_VERSION'] || '~> 6.0'
33+
puppetversion = ENV['PUPPET_GEM_VERSION'] || '>= 6.0'
3334
gem 'puppet', puppetversion, :require => false, :groups => [:test]
3435

3536
# vim: syntax=ruby

0 commit comments

Comments
 (0)