Skip to content

Commit d8fc500

Browse files
committed
modulesync 2.3.1
1 parent e656256 commit d8fc500

25 files changed

+72
-258
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# editorconfig.org
2+
3+
# MANAGED BY MODULESYNC
4+
5+
root = true
6+
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
indent_size = 2
11+
tab_width = 2
12+
indent_style = space
13+
insert_final_newline = true
14+
trim_trailing_whitespace = true

.github/CONTRIBUTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,21 @@ To run a specific spec test set the `SPEC` variable:
109109
bundle exec rake spec SPEC=spec/foo_spec.rb
110110
```
111111

112+
### Unit tests in docker
113+
114+
Some people don't want to run the dependencies locally or don't want to install
115+
ruby. We ship a Dockerfile that enables you to run all unit tests and linting.
116+
You only need to run:
117+
118+
```sh
119+
docker build .
120+
```
121+
122+
Please ensure that a docker daemon is running and that your user has the
123+
permission to talk to it. You can specify a remote docker host by setting the
124+
`DOCKER_HOST` environment variable. it will copy the content of the module into
125+
the docker image. So it will not work if a Gemfile.lock exists.
126+
112127
## Integration tests
113128

114129
The unit tests just check the code runs, not that it does exactly what

.msync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
modulesync_config_version: '2.1.0'
1+
modulesync_config_version: '2.3.1'

.pmtignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ Puppetfile.lock
1818
*.iml
1919
.*.sw?
2020
.yardoc/
21+
Dockerfile

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,37 +28,37 @@ matrix:
2828
- rvm: 2.5.1
2929
bundler_args: --without development release
3030
dist: trusty
31-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64{hypervisor=docker} CHECK=beaker
31+
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
3232
services: docker
3333
sudo: required
3434
- rvm: 2.5.1
3535
bundler_args: --without development release
3636
dist: trusty
37-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos7-64{hypervisor=docker} CHECK=beaker
37+
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
3838
services: docker
3939
sudo: required
4040
- rvm: 2.5.1
4141
bundler_args: --without development release
4242
dist: trusty
43-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=centos7-64{hypervisor=docker} CHECK=beaker
43+
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
4444
services: docker
4545
sudo: required
4646
- rvm: 2.5.1
4747
bundler_args: --without development release
4848
dist: trusty
49-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64{hypervisor=docker} CHECK=beaker
49+
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
5050
services: docker
5151
sudo: required
5252
- rvm: 2.5.1
5353
bundler_args: --without development release
5454
dist: trusty
55-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian9-64{hypervisor=docker} CHECK=beaker
55+
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
5656
services: docker
5757
sudo: required
5858
- rvm: 2.5.1
5959
bundler_args: --without development release
6060
dist: trusty
61-
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=debian9-64{hypervisor=docker} CHECK=beaker
61+
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
6262
services: docker
6363
sudo: required
6464
branches:

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM ruby:2.5.1
2+
3+
WORKDIR /opt/puppet
4+
5+
# https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39
6+
RUN mkdir -p /etc/sv
7+
8+
ARG PUPPET_VERSION="~> 6.0"
9+
ARG PARALLEL_TEST_PROCESSORS=4
10+
11+
# Cache gems
12+
COPY Gemfile .
13+
RUN bundle install --without system_tests development release --path=${BUNDLE_PATH:-vendor/bundle}
14+
15+
COPY . .
16+
17+
RUN bundle install
18+
RUN bundle exec release_checks
19+
20+
# Container should not saved
21+
RUN exit 1

Gemfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ end
1212

1313
group :test do
1414
gem 'puppetlabs_spec_helper', '>= 2.11.0', :require => false
15-
gem 'rspec-puppet-facts', :require => false
15+
gem 'rspec-puppet-facts', '>= 1.8.0', :require => false
1616
gem 'rspec-puppet-utils', :require => false
1717
gem 'puppet-lint-leading_zero-check', :require => false
1818
gem 'puppet-lint-trailing_comma-check', :require => false
@@ -28,7 +28,8 @@ group :test do
2828
gem 'coveralls', :require => false
2929
gem 'simplecov-console', :require => false
3030
gem 'rack', '~> 1.0', :require => false if RUBY_VERSION < '2.2.2'
31-
gem 'parallel_tests', :require => false
31+
gem 'parallel_tests', '2.24.0', :require => false if RUBY_VERSION < '2.2.0'
32+
gem 'parallel_tests', :require => false if RUBY_VERSION >= '2.2.0'
3233
end
3334

3435
group :development do
@@ -43,15 +44,15 @@ group :system_tests do
4344
if beaker_version = ENV['BEAKER_VERSION']
4445
gem 'beaker', *location_for(beaker_version)
4546
else
46-
gem 'beaker', '>= 3.9.0', :require => false
47+
gem 'beaker', '>= 4.2.0', :require => false
4748
end
4849
if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
4950
gem 'beaker-rspec', *location_for(beaker_rspec_version)
5051
else
5152
gem 'beaker-rspec', :require => false
5253
end
5354
gem 'serverspec', :require => false
54-
gem 'beaker-hostgenerator', '>= 1.1.10', :require => false
55+
gem 'beaker-hostgenerator', '>= 1.1.22', :require => false
5556
gem 'beaker-docker', :require => false
5657
gem 'beaker-puppet', :require => false
5758
gem 'beaker-puppet_install_helper', :require => false

spec/acceptance/nodesets/centos-511-x64.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

spec/acceptance/nodesets/centos-6-x64.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

spec/acceptance/nodesets/centos-66-x64-pe.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)