Skip to content

Commit

Permalink
Merge pull request voxpupuli#370 from voxpupuli/modulesync
Browse files Browse the repository at this point in the history
modulesync 4.1.0
  • Loading branch information
oranenj authored Apr 20, 2021
2 parents ef4f1bf + 56cfa47 commit 5cb9b00
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 51 deletions.
34 changes: 2 additions & 32 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,33 +232,7 @@ simple tests against it after applying the module. You can run this
with:

```sh
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
BEAKER_setfile=debian10-x64 bundle exec rake beaker
```

You can replace the string `debian10` with any common operating system.
Expand All @@ -272,11 +246,7 @@ The following strings are known to work:
* centos7
* centos8

The easiest way to debug in a docker container is to open a shell:

```sh
docker exec -it -u root ${container_id_or_name} bash
```
For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests).

The source of this file is in our [modulesync_config](https://github.com/voxpupuli/modulesync_config/blob/master/moduleroot/.github/CONTRIBUTING.md.erb)
repository.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ jobs:
setup_matrix:
name: 'Setup Test Matrix'
runs-on: ubuntu-latest
timeout-minutes: 40
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
BUNDLE_WITHOUT: development:release
steps:
- uses: actions/checkout@v2
- name: Setup ruby
Expand All @@ -21,13 +22,16 @@ jobs:
bundler-cache: true
- name: Run rake validate
run: bundle exec rake validate
- 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:
Expand Down Expand Up @@ -58,10 +62,6 @@ jobs:
puppet: ${{fromJson(needs.setup_matrix.outputs.puppet_major_versions)}}
name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
steps:
- name: Enable IPv6 on docker
run: |
echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
sudo service docker restart
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
Expand Down
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
modulesync_config_version: '4.0.0'
modulesync_config_version: '4.1.0'
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.5.3
FROM ruby:2.7

WORKDIR /opt/puppet

Expand Down
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ group :system_tests do
end

group :release do
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/voxpupuli/github-changelog-generator', :branch => 'voxpupuli_essential_fixes'
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false
gem 'puppet-strings', '>= 2.2', :require => false
gem 'github_changelog_generator', '>= 1.16.1', :require => false
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false
gem 'puppet-strings', '>= 2.2', :require => false
end

gem 'puppetlabs_spec_helper', '~> 2.0', :require => false
Expand Down
3 changes: 1 addition & 2 deletions spec/classes/jira_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
with_content(%r{jdbc:postgresql://localhost:5432/jira}).
with_content(%r{<schema-name>public</schema-name>}).
without_content(%r{<pool})

end
it { is_expected.not_to contain_file('/home/jira/cluster.properties') }
it { is_expected.not_to contain_file('/opt/jira/atlassian-jira-software-8.13.5-standalone/bin/check-java.sh') }
Expand Down Expand Up @@ -288,7 +287,7 @@
{
version: '8.13.5',
javahome: '/opt/java',
tomcat_connection_timeout: 25000
tomcat_connection_timeout: 25_000
}
end

Expand Down
12 changes: 6 additions & 6 deletions spec/classes/jira_mysql_connector_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
end
it 'deploys mysql connector 5.1.34 from tar.gz' do
is_expected.to contain_archive('/opt/MySQL-connector/mysql-connector-java-5.1.34.tar.gz').with('source' => 'https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.34.tar.gz',
'extract_path' => '/opt/MySQL-connector',
'creates' => '/opt/MySQL-connector/mysql-connector-java-5.1.34')
'extract_path' => '/opt/MySQL-connector',
'creates' => '/opt/MySQL-connector/mysql-connector-java-5.1.34')
end
end
context 'mysql connector defaults Connector Version >8' do
Expand All @@ -55,8 +55,8 @@
end
it 'deploys mysql connector 8.0.23 from tar.gz' do
is_expected.to contain_archive('/opt/MySQL-connector/mysql-connector-java-8.0.23.tar.gz').with('source' => 'https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.23.tar.gz',
'extract_path' => '/opt/MySQL-connector',
'creates' => '/opt/MySQL-connector/mysql-connector-java-8.0.23')
'extract_path' => '/opt/MySQL-connector',
'creates' => '/opt/MySQL-connector/mysql-connector-java-8.0.23')
end
end
context 'mysql connector overwrite params' do
Expand All @@ -82,8 +82,8 @@
end
it 'deploys mysql connector 5.1.15 from zip' do
is_expected.to contain_archive('/opt/foo/mysql-connector-java-5.1.15.zip').with('source' => 'http://example.co.za/foo/mysql-connector-java-5.1.15.zip',
'extract_path' => '/opt/foo',
'creates' => '/opt/foo/mysql-connector-java-5.1.15')
'extract_path' => '/opt/foo',
'creates' => '/opt/foo/mysql-connector-java-5.1.15')
end
end
context 'mysql_connector_mangage equals false' do
Expand Down

0 comments on commit 5cb9b00

Please sign in to comment.