Merge pull request #23 from voxpupuli/modulesync

modulesync 4.0.0
This commit is contained in:
Tim Meusel 2020-11-26 09:27:57 +01:00 committed by GitHub
commit 51fa9c87c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 114 additions and 88 deletions

View File

@ -232,14 +232,14 @@ simple tests against it after applying the module. You can run this
with:
```sh
bundle exec rake acceptance
bundle exec rake beaker
```
This will run the tests on the module's default nodeset. You can override the
nodeset used, e.g.,
```sh
BEAKER_set=centos-7-x64 bundle exec rake acceptance
BEAKER_set=centos-7-x64 bundle exec rake beaker
```
There are default rake tasks for the various acceptance test modules, e.g.,
@ -269,7 +269,6 @@ The following strings are known to work:
* ubuntu2004
* debian9
* debian10
* centos6
* centos7
* centos8

47
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: CI
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

29
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,29 @@
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

View File

@ -1,2 +1,2 @@
---
modulesync_config_version: '3.1.0'
modulesync_config_version: '4.0.0'

View File

@ -1,11 +1,12 @@
docs/
pkg/
Gemfile
Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/fixtures/manifests/
spec/fixtures/modules/
spec/
Rakefile
.vagrant/
.bundle/
.ruby-version
@ -13,9 +14,21 @@ 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

View File

@ -6,10 +6,3 @@ Gemfile:
':testextra':
- gem: 'rspec-mocks'
- gem: 'rspec-expectations'
spec/spec_helper.rb:
mock_with: ':rspec'
.rubocop.yml:
cops:
Security/MarshalLoad: false
.travis.yml:
secure: "rIqlHIjLtJOQiJ5LX8qPje8PFBcu52Vv5GEpioxp+jf7/BQVGkMik1bVIkkorI5CDsmjJJqfZwuuMK3JoHKnlI8jNtSQlA/lrszRJm2fhCBXZAQwQz2n8azaszH/ysNsBJ56zZj/DlT+S7uR9gVLYiuHsTjgCLDQEfc1Y0yn6UbU04sGIuXmwCqF+E7vtGVyJW+PsdqakQawbb/jK8F0ah9cw3yj4CTQpMVIP/JwYubZ+ACXvrxWh8+/U8T7s8GE0+X8gcGRK1DB06iov09Mo78gHwx4jaedwFz/HUKyKZqfSqYNC4OA2/fPJsPOdje74Fb/IvDPLamEkgLcltjZsjdyq2mRlLej2WKhQb5wCEKFPDJAi18GcVOyayp9YDF0F6q1EfUhfJlJUj3eUJVO62dNujcFb6GM401qnWr3QD07V2PaHVQjGIO+FUykV+8s6x7qeBNxXQ2IBh1+n7iYBbIzibvMI3E0pLEThToWp+bheqHgjLSqZ6n/kttzPuBQHZCEgX2hAHH1g8IkEDgAYzV1exdqaICgCoj0IAnqhAOVDV1g9IZpxPc3UlP2oTLaY47W64F6sIKbBo/f7+wimnt/9bagzFI7uED+cOCF1IFglCQkl21kzTcrTIdztTyVkNicJtII/fKNuMKlZu4B5WATb+eZrFiiyyA09fwh+XU="

View File

@ -1,49 +0,0 @@
---
# yamllint disable rule:line-length rule:truthy
os: linux
dist: focal
language: ruby
cache: bundler
before_install:
- yes | gem update --system
- bundle --version
script:
- 'bundle exec rake $CHECK'
jobs:
fast_finish: true
include:
- rvm: 2.4.4
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=test
- rvm: 2.5.3
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 6.0" CHECK=test_with_coveralls
- rvm: 2.5.3
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 6.0" CHECK=rubocop
- rvm: 2.4.4
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=build DEPLOY_TO_FORGE=yes
branches:
only:
- master
- /^v\d/
notifications:
email: false
webhooks: https://voxpupu.li/incoming/travis
irc:
on_success: always
on_failure: always
channels:
- "chat.freenode.org#voxpupuli-notifications"
deploy:
provider: puppetforge
username: puppet
password:
secure: "rIqlHIjLtJOQiJ5LX8qPje8PFBcu52Vv5GEpioxp+jf7/BQVGkMik1bVIkkorI5CDsmjJJqfZwuuMK3JoHKnlI8jNtSQlA/lrszRJm2fhCBXZAQwQz2n8azaszH/ysNsBJ56zZj/DlT+S7uR9gVLYiuHsTjgCLDQEfc1Y0yn6UbU04sGIuXmwCqF+E7vtGVyJW+PsdqakQawbb/jK8F0ah9cw3yj4CTQpMVIP/JwYubZ+ACXvrxWh8+/U8T7s8GE0+X8gcGRK1DB06iov09Mo78gHwx4jaedwFz/HUKyKZqfSqYNC4OA2/fPJsPOdje74Fb/IvDPLamEkgLcltjZsjdyq2mRlLej2WKhQb5wCEKFPDJAi18GcVOyayp9YDF0F6q1EfUhfJlJUj3eUJVO62dNujcFb6GM401qnWr3QD07V2PaHVQjGIO+FUykV+8s6x7qeBNxXQ2IBh1+n7iYBbIzibvMI3E0pLEThToWp+bheqHgjLSqZ6n/kttzPuBQHZCEgX2hAHH1g8IkEDgAYzV1exdqaICgCoj0IAnqhAOVDV1g9IZpxPc3UlP2oTLaY47W64F6sIKbBo/f7+wimnt/9bagzFI7uED+cOCF1IFglCQkl21kzTcrTIdztTyVkNicJtII/fKNuMKlZu4B5WATb+eZrFiiyyA09fwh+XU="
on:
tags: true
# all_branches is required to use tags
all_branches: true
# Only publish the build marked with "DEPLOY_TO_FORGE"
condition: "$DEPLOY_TO_FORGE = yes"

27
Gemfile
View File

@ -1,15 +1,5 @@
source ENV['GEM_SOURCE'] || "https://rubygems.org"
def location_for(place, fake_version = nil)
if place =~ /^(git[:@][^#]*)#(.*)/
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
elsif place =~ /^file:\/\/(.*)/
['>= 0', { :path => File.expand_path($1), :require => false }]
else
[place, { :require => false }]
end
end
group :test do
gem 'voxpupuli-test', '~> 2.1', :require => false
gem 'coveralls', :require => false
@ -17,14 +7,13 @@ group :test do
end
group :development do
gem 'travis', :require => false
gem 'travis-lint', :require => false
gem 'guard-rake', :require => false
gem 'overcommit', '>= 0.39.1', :require => false
end
group :system_tests do
gem 'voxpupuli-acceptance', :require => false
gem 'puppet_metadata', '~> 0.3.0', :require => false
gem 'voxpupuli-acceptance', :require => false
end
group :release do
@ -43,15 +32,11 @@ group :testextra do
gem 'rspec-expectations', :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]
if facterversion = ENV['FACTER_GEM_VERSION']
gem 'facter', facterversion.to_s, :require => false, :groups => [:test]
else
gem 'facter', :require => false, :groups => [:test]
end
ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 6.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
puppetversion = ENV['PUPPET_VERSION'] || '~> 6.0'
gem 'puppet', puppetversion, :require => false, :groups => [:test]
# vim: syntax=ruby

View File

@ -1,4 +1,10 @@
require 'voxpupuli/test/rake'
# Attempt to load voxupuli-test (which pulls in puppetlabs_spec_helper),
# otherwise attempt to load it directly.
begin
require 'voxpupuli/test/rake'
rescue LoadError
require 'puppetlabs_spec_helper/rake_tasks'
end
# load optional tasks for releases
# only available if gem group releases is installed
@ -26,6 +32,7 @@ end
begin
require 'github_changelog_generator/task'
require 'puppet_blacksmith'
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
version = (Blacksmith::Modulefile.new).version
config.future_release = "v#{version}" if version =~ /^\d+\.\d+.\d+$/

View File

@ -7,6 +7,12 @@
"source": "https://github.com/xaque208/puppet-ldapquery",
"project_page": "https://github.com/xaque208/puppet-ldapquery",
"issues_url": "https://github.com/xaque208/puppet-ldapquery/issues",
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 5.5.8 < 7.0.0"
}
],
"dependencies": [
]

View File

@ -2,10 +2,6 @@
# https://github.com/voxpupuli/modulesync
# https://github.com/voxpupuli/modulesync_config
RSpec.configure do |c|
c.mock_with :rspec
end
# 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.
ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../../lib', __FILE__))