modulesync 4.1.0

This commit is contained in:
Tim Meusel 2021-06-15 20:22:47 +02:00
parent 30da42eb71
commit 8f16595816
No known key found for this signature in database
GPG Key ID: 04D659E6BF1C4CC0
6 changed files with 14 additions and 72 deletions

View File

@ -232,33 +232,7 @@ simple tests against it after applying the module. You can run this
with: with:
```sh ```sh
bundle exec rake beaker BEAKER_setfile=debian10-x64 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 beaker
```
There are default rake tasks for the various acceptance test modules, e.g.,
```sh
bundle exec rake beaker:centos-7-x64
bundle exec rake beaker:ssh:centos-7-x64
```
If you don't want to have to recreate the virtual machine every time you can
use `BEAKER_destroy=no` and `BEAKER_provision=no`. On the first run you will at
least need `BEAKER_provision` set to yes (the default). The Vagrantfile for the
created virtual machines will be in `.vagrant/beaker_vagrant_files`.
Beaker also supports docker containers. We also use that in our automated CI
pipeline at [travis-ci](http://travis-ci.org). To use that instead of Vagrant:
```sh
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
``` ```
You can replace the string `debian10` with any common operating system. You can replace the string `debian10` with any common operating system.
@ -272,11 +246,7 @@ The following strings are known to work:
* centos7 * centos7
* centos8 * centos8
The easiest way to debug in a docker container is to open a shell: For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests).
```sh
docker exec -it -u root ${container_id_or_name} bash
```
The source of this file is in our [modulesync_config](https://github.com/voxpupuli/modulesync_config/blob/master/moduleroot/.github/CONTRIBUTING.md.erb) The source of this file is in our [modulesync_config](https://github.com/voxpupuli/modulesync_config/blob/master/moduleroot/.github/CONTRIBUTING.md.erb)
repository. repository.

View File

@ -6,12 +6,13 @@ jobs:
setup_matrix: setup_matrix:
name: 'Setup Test Matrix' name: 'Setup Test Matrix'
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 40
outputs: outputs:
beaker_setfiles: ${{ steps.get-outputs.outputs.beaker_setfiles }} beaker_setfiles: ${{ steps.get-outputs.outputs.beaker_setfiles }}
puppet_major_versions: ${{ steps.get-outputs.outputs.puppet_major_versions }} puppet_major_versions: ${{ steps.get-outputs.outputs.puppet_major_versions }}
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }} puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
env: env:
BUNDLE_WITHOUT: development:test:release BUNDLE_WITHOUT: development:release
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Setup ruby - name: Setup ruby
@ -21,6 +22,8 @@ jobs:
bundler-cache: true bundler-cache: true
- name: Run rake validate - name: Run rake validate
run: bundle exec rake validate run: bundle exec rake validate
- name: Run rake rubocop
run: bundle exec rake rubocop
- name: Setup Test Matrix - name: Setup Test Matrix
id: get-outputs id: get-outputs
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false
@ -28,6 +31,7 @@ jobs:
unit: unit:
needs: setup_matrix needs: setup_matrix
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 40
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:

View File

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

View File

@ -1,4 +1,4 @@
FROM ruby:2.5.3 FROM ruby:2.7
WORKDIR /opt/puppet WORKDIR /opt/puppet

10
Gemfile
View File

@ -17,10 +17,10 @@ group :system_tests do
end end
group :release do group :release do
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/voxpupuli/github-changelog-generator', :branch => 'voxpupuli_essential_fixes' gem 'github_changelog_generator', '>= 1.16.1', :require => false
gem 'puppet-blacksmith', :require => false gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false gem 'voxpupuli-release', :require => false
gem 'puppet-strings', '>= 2.2', :require => false gem 'puppet-strings', '>= 2.2', :require => false
end end
group :extra do group :extra do
@ -36,7 +36,7 @@ gem 'puppetlabs_spec_helper', '~> 2.0', :require => false
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_VERSION'] || '>= 6.0'
gem 'puppet', puppetversion, :require => false, :groups => [:test] gem 'puppet', puppetversion, :require => false, :groups => [:test]
# vim: syntax=ruby # vim: syntax=ruby

32
Jenkinsfile vendored
View File

@ -1,32 +0,0 @@
pipeline {
agent any
triggers { pollSCM('*/15 * * * *') }
environment {
PATH = "$PATH:~/.rbenv/bin"
}
stages {
stage('test') {
steps {
sh '. .env.sh && printenv && bundle install --without=development system_tests'
sh '. .env.sh && bundle exec rake test'
}
}
stage('build') {
when {
branch 'master'
}
steps {
sh 'git fetch --all --tags'
sh '. .env.sh && bundle exec rake clean'
sh '. .env.sh && bundle exec rake build'
sh '. .env.sh && [ "$(git rev-list -n 1 $(git tag | tail -n 1 ))" == "$(git rev-list -n 1 HEAD)" ] && bundle exec rake module:push || echo HEAD is not a tag'
}
}
}
}