Révision 0893064d
modulesync 5.2.0
.github/CONTRIBUTING.md | ||
---|---|---|
124 | 124 |
you must set an environment variable such as: |
125 | 125 |
|
126 | 126 |
```sh |
127 |
export PUPPET_VERSION="~> 5.5.6" |
|
127 |
export PUPPET_GEM_VERSION="~> 5.5.6"
|
|
128 | 128 |
``` |
129 | 129 |
|
130 | 130 |
You can install all needed gems for spec tests into the modules directory by |
... | ... | |
232 | 232 |
with: |
233 | 233 |
|
234 | 234 |
```sh |
235 |
BEAKER_setfile=debian10-x64 bundle exec rake beaker
|
|
235 |
BEAKER_setfile=debian11-64 bundle exec rake beaker
|
|
236 | 236 |
``` |
237 | 237 |
|
238 | 238 |
You can replace the string `debian10` with any common operating system. |
239 | 239 |
The following strings are known to work: |
240 | 240 |
|
241 |
* ubuntu1604 |
|
242 | 241 |
* ubuntu1804 |
243 | 242 |
* ubuntu2004 |
244 |
* debian9 |
|
245 | 243 |
* debian10 |
244 |
* debian11 |
|
246 | 245 |
* centos7 |
247 | 246 |
* centos8 |
248 | 247 |
|
.github/workflows/ci.yml | ||
---|---|---|
7 | 7 |
on: pull_request |
8 | 8 |
|
9 | 9 |
concurrency: |
10 |
group: ${{ github.head_ref }}
|
|
10 |
group: ${{ github.ref_name }}
|
|
11 | 11 |
cancel-in-progress: true |
12 | 12 |
|
13 | 13 |
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 | ||
---|---|---|
9 | 9 |
tags: |
10 | 10 |
- '*' |
11 | 11 |
|
12 |
env: |
|
13 |
BUNDLE_WITHOUT: development:test:system_tests |
|
14 |
|
|
15 | 12 |
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 | ||
---|---|---|
2 | 2 |
# Managed by modulesync - DO NOT EDIT |
3 | 3 |
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ |
4 | 4 |
|
5 |
modulesync_config_version: '5.1.0' |
|
5 |
modulesync_config_version: '5.2.0' |
Dockerfile | ||
---|---|---|
8 | 8 |
# https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39 |
9 | 9 |
RUN mkdir -p /etc/sv |
10 | 10 |
|
11 |
ARG PUPPET_VERSION="~> 6.0" |
|
11 |
ARG PUPPET_GEM_VERSION="~> 6.0"
|
|
12 | 12 |
ARG PARALLEL_TEST_PROCESSORS=4 |
13 | 13 |
|
14 | 14 |
# Cache gems |
Gemfile | ||
---|---|---|
1 | 1 |
# Managed by modulesync - DO NOT EDIT |
2 | 2 |
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ |
3 | 3 |
|
4 |
source ENV['GEM_SOURCE'] || "https://rubygems.org"
|
|
4 |
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
|
5 | 5 |
|
6 | 6 |
group :test do |
7 | 7 |
gem 'voxpupuli-test', '~> 5.0', :require => false |
8 | 8 |
gem 'coveralls', :require => false |
9 | 9 |
gem 'simplecov-console', :require => false |
10 | 10 |
gem 'puppet_metadata', '~> 1.0', :require => false |
11 |
gem 'puppet-lint-param-docs', :require => false |
|
12 | 11 |
end |
13 | 12 |
|
14 | 13 |
group :development do |
... | ... | |
29 | 28 |
gem 'rake', :require => false |
30 | 29 |
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test] |
31 | 30 |
|
32 |
puppetversion = ENV['PUPPET_VERSION'] || '>= 6.0' |
|
31 |
puppetversion = ENV['PUPPET_GEM_VERSION'] || '>= 6.0'
|
|
33 | 32 |
gem 'puppet', puppetversion, :require => false, :groups => [:test] |
34 | 33 |
|
35 | 34 |
# vim: syntax=ruby |
Formats disponibles : Unified diff