modulesync 5.2.0

This commit is contained in:
Tim 2021-12-15 20:30:05 +01:00 committed by Tim Meusel
parent ae530bfa7f
commit f73013318b
No known key found for this signature in database
GPG Key ID: 04D659E6BF1C4CC0
9 changed files with 32 additions and 92 deletions

View File

@ -124,7 +124,7 @@ If you have Ruby 2.x or want a specific version of Puppet,
you must set an environment variable such as: you must set an environment variable such as:
```sh ```sh
export PUPPET_VERSION="~> 5.5.6" export PUPPET_GEM_VERSION="~> 6.1.0"
``` ```
You can install all needed gems for spec tests into the modules directory by 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
with: with:
```sh ```sh
BEAKER_setfile=debian10-x64 bundle exec rake beaker BEAKER_setfile=debian11-64 bundle exec rake beaker
``` ```
You can replace the string `debian10` with any common operating system. You can replace the string `debian10` with any common operating system.
The following strings are known to work: The following strings are known to work:
* ubuntu1604
* ubuntu1804 * ubuntu1804
* ubuntu2004 * ubuntu2004
* debian9
* debian10 * debian10
* debian11
* centos7 * centos7
* centos8 * centos8

View File

@ -7,60 +7,10 @@ name: CI
on: pull_request on: pull_request
concurrency: concurrency:
group: ${{ github.head_ref }} group: ${{ github.ref_name }}
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
setup_matrix: puppet:
name: 'Setup Test Matrix' name: Puppet
runs-on: ubuntu-latest uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v1
timeout-minutes: 40
outputs:
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
github_action_test_matrix: ${{ steps.get-outputs.outputs.github_action_test_matrix }}
env:
BUNDLE_WITHOUT: development:system_tests:release
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- name: Run static validations
run: bundle exec rake validate lint check
- name: Run rake rubocop
run: bundle exec rake rubocop
- name: Setup Test Matrix
id: get-outputs
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false
unit:
needs: setup_matrix
runs-on: ubuntu-latest
timeout-minutes: 40
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 parallel_spec
tests:
needs:
- unit
runs-on: ubuntu-latest
name: Test suite
steps:
- run: echo Test suite completed

View File

@ -9,26 +9,14 @@ on:
tags: tags:
- '*' - '*'
env:
BUNDLE_WITHOUT: development:test:system_tests
jobs: jobs:
deploy: release:
name: 'deploy to forge' name: Release
runs-on: ubuntu-latest uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v1
if: github.repository_owner == 'voxpupuli'
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with: with:
ruby-version: '2.7' allowed_owner: 'voxpupuli'
bundler-cache: true secrets:
- name: Build and Deploy
env:
# Configure secrets here: # Configure secrets here:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets # https://docs.github.com/en/actions/security-guides/encrypted-secrets
BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}' username: ${{ secrets.PUPPET_FORGE_USERNAME }}
BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}' api_key: ${{ secrets.PUPPET_FORGE_API_KEY }}
run: bundle exec rake module:push

View File

@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT # Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
modulesync_config_version: '4.2.0' modulesync_config_version: '5.2.0'

3
.puppet-lint.rc Normal file
View File

@ -0,0 +1,3 @@
--fail-on-warnings
--no-parameter_documentation-check
--no-parameter_types-check

View File

@ -8,7 +8,7 @@ WORKDIR /opt/puppet
# https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39 # https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39
RUN mkdir -p /etc/sv RUN mkdir -p /etc/sv
ARG PUPPET_VERSION="~> 6.0" ARG PUPPET_GEM_VERSION="~> 6.0"
ARG PARALLEL_TEST_PROCESSORS=4 ARG PARALLEL_TEST_PROCESSORS=4
# Cache gems # Cache gems

View File

@ -1,10 +1,10 @@
# Managed by modulesync - DO NOT EDIT # Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ # 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 group :test do
gem 'voxpupuli-test', '~> 2.5', :require => false gem 'voxpupuli-test', '~> 5.0', :require => false
gem 'coveralls', :require => false gem 'coveralls', :require => false
gem 'simplecov-console', :require => false gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 1.0', :require => false gem 'puppet_metadata', '~> 1.0', :require => false
@ -21,7 +21,7 @@ end
group :release do group :release do
gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5' gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5'
gem 'voxpupuli-release', '>= 1.0.2', :require => false gem 'voxpupuli-release', '>= 1.2.0', :require => false
gem 'puppet-strings', '>= 2.2', :require => false gem 'puppet-strings', '>= 2.2', :require => false
end end
@ -37,7 +37,7 @@ end
gem 'rake', :require => false gem 'rake', :require => false
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test] gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]
puppetversion = ENV['PUPPET_VERSION'] || '>= 6.0' puppetversion = ENV['PUPPET_GEM_VERSION'] || '>= 6.0'
gem 'puppet', puppetversion, :require => false, :groups => [:test] gem 'puppet', puppetversion, :require => false, :groups => [:test]
# vim: syntax=ruby # vim: syntax=ruby

View File

@ -1,7 +1,7 @@
# Managed by modulesync - DO NOT EDIT # Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
# Attempt to load voxupuli-test (which pulls in puppetlabs_spec_helper), # Attempt to load voxpupuli-test (which pulls in puppetlabs_spec_helper),
# otherwise attempt to load it directly. # otherwise attempt to load it directly.
begin begin
require 'voxpupuli/test/rake' require 'voxpupuli/test/rake'

View File

@ -1,17 +1,17 @@
# frozen_string_literal: true
# Managed by modulesync - DO NOT EDIT # Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/ # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
# puppetlabs_spec_helper will set up coverage if the env variable is set. # puppetlabs_spec_helper will set up coverage if the env variable is set.
# We want to do this if lib exists and it hasn't been explicitly set. # We want to do this if lib exists and it hasn't been explicitly set.
ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../../lib', __FILE__)) ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../lib', __dir__))
require 'voxpupuli/test/spec_helper' require 'voxpupuli/test/spec_helper'
if File.exist?(File.join(__dir__, 'default_module_facts.yml')) if File.exist?(File.join(__dir__, 'default_module_facts.yml'))
facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml'))) facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml')))
if facts facts&.each do |name, value|
facts.each do |name, value|
add_custom_fact name.to_sym, value add_custom_fact name.to_sym, value
end end
end end
end