Skip to content

Commit e2de457

Browse files
committed
modulesync 1.9.0-29-g1ba9f1e
1 parent f1422c8 commit e2de457

45 files changed

Lines changed: 1592 additions & 125 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CONTRIBUTING.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
This module has grown over time based on a range of contributions from
2+
people using it. If you follow these contributing guidelines your patch
3+
will likely make it into a release a little more quickly.
4+
5+
## Contributing
6+
7+
Please note that this project is released with a Contributor Code of Conduct.
8+
By participating in this project you agree to abide by its terms.
9+
[Contributor Code of Conduct](https://voxpupuli.org/coc/).
10+
11+
1. Fork the repo.
12+
13+
1. Create a separate branch for your change.
14+
15+
1. Run the tests. We only take pull requests with passing tests, and
16+
documentation.
17+
18+
1. Add a test for your change. Only refactoring and documentation
19+
changes require no new tests. If you are adding functionality
20+
or fixing a bug, please add a test.
21+
22+
1. Squash your commits down into logical components. Make sure to rebase
23+
against the current master.
24+
25+
1. Push the branch to your fork and submit a pull request.
26+
27+
Please be prepared to repeat some of these steps as our contributors review
28+
your code.
29+
30+
## Dependencies
31+
32+
The testing and development tools have a bunch of dependencies,
33+
all managed by [bundler](http://bundler.io/) according to the
34+
[Puppet support matrix](http://docs.puppetlabs.com/guides/platforms.html#ruby-versions).
35+
36+
By default the tests use a baseline version of Puppet.
37+
38+
If you have Ruby 2.x or want a specific version of Puppet,
39+
you must set an environment variable such as:
40+
41+
export PUPPET_VERSION="~> 4.2.0"
42+
43+
You can install all needed gems for spec tests into the modules directory by
44+
running:
45+
46+
```sh
47+
bundle install --path .vendor/ --without development --without system_tests --without release
48+
```
49+
50+
If you also want to run acceptance tests:
51+
52+
```sh
53+
bundle install --path .vendor/ --without development --with system_tests --without release
54+
```
55+
56+
Our all in one solution if you don't know if you need to install or update gems:
57+
58+
```sh
59+
bundle install --path .vendor/ --without development --with system_tests --without release; bundle update; bundle clean
60+
```
61+
62+
## Syntax and style
63+
64+
The test suite will run [Puppet Lint](http://puppet-lint.com/) and
65+
[Puppet Syntax](https://github.com/gds-operations/puppet-syntax) to
66+
check various syntax and style things. You can run these locally with:
67+
68+
bundle exec rake lint
69+
bundle exec rake validate
70+
71+
It will also run some [Rubocop](http://batsov.com/rubocop/) tests
72+
against it. You can run those locally ahead of time with:
73+
74+
bundle exec rake rubocop
75+
76+
## Running the unit tests
77+
78+
The unit test suite covers most of the code, as mentioned above please
79+
add tests if you're adding new functionality. If you've not used
80+
[rspec-puppet](http://rspec-puppet.com/) before then feel free to ask
81+
about how best to test your new feature.
82+
83+
To run the linter, the syntax checker and the unit tests:
84+
85+
bundle exec rake test
86+
87+
To run your all the unit tests
88+
89+
bundle exec rake spec SPEC_OPTS='--format documentation'
90+
91+
To run a specific spec test set the `SPEC` variable:
92+
93+
bundle exec rake spec SPEC=spec/foo_spec.rb
94+
95+
## Integration tests
96+
97+
The unit tests just check the code runs, not that it does exactly what
98+
we want on a real machine. For that we're using
99+
[beaker](https://github.com/puppetlabs/beaker).
100+
101+
This fires up a new virtual machine (using vagrant) and runs a series of
102+
simple tests against it after applying the module. You can run this
103+
with:
104+
105+
bundle exec rake acceptance
106+
107+
This will run the tests on the module's default nodeset. You can override the
108+
nodeset used, e.g.,
109+
110+
BEAKER_set=centos-7-x64 bundle exec rake acceptance
111+
112+
There are default rake tasks for the various acceptance test modules, e.g.,
113+
114+
bundle exec rake beaker:centos-7-x64
115+
bundle exec rake beaker:ssh:centos-7-x64
116+
117+
If you don't want to have to recreate the virtual machine every time you can
118+
use `BEAKER_destroy=no` and `BEAKER_provision=no`. On the first run you will at
119+
least need `BEAKER_provision` set to yes (the default). The Vagrantfile for the
120+
created virtual machines will be in `.vagrant/beaker_vagrant_files`.
121+
122+
The easiest way to debug in a docker container is to open a shell:
123+
124+
docker exec -it -u root ${container_id_or_name} bash

.github/ISSUE_TEMPLATE.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!--
2+
Thank you for contributing to this project!
3+
4+
- This project has a Contributor Code of Conduct: https://voxpupuli.org/coc/
5+
- Please check that here is no existing issue or PR that addresses your problem.
6+
- Please fill the following form to enable us to help you.
7+
- Our vulnerabilities reporting process is at https://voxpupuli.org/security/
8+
9+
-->
10+
11+
## Affected Puppet, Ruby, OS and module versions/distributions
12+
13+
- Puppet:
14+
- Ruby:
15+
- Distribution:
16+
- Module version:
17+
18+
## How to reproduce (e.g Puppet code you use)
19+
20+
## What are you seeing
21+
22+
## What behaviour did you expect instead
23+
24+
## Output log
25+
26+
## Any additional information you'd like to impart

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!--
2+
Thank you for contributing to this project!
3+
4+
- This project has a Contributor Code of Conduct: https://voxpupuli.org/coc/
5+
- Please check that here is no existing issue or PR that addresses your problem.
6+
- Our vulnerabilities reporting process is at https://voxpupuli.org/security/
7+
8+
-->
9+
#### Pull Request (PR) description
10+
<!--
11+
Replace this comment with a description of your pull request.
12+
-->
13+
14+
#### This Pull Request (PR) fixes the following issues
15+
<!--
16+
Replace this comment with the list of issues or n/a.
17+
Use format:
18+
Fixes #123
19+
Fixes #124
20+
-->

.gitignore

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,20 @@
1-
# Editors
2-
project.xml
3-
project.properties
4-
/nbproject/private/
5-
.buildpath
6-
.project
7-
.settings*
8-
sftp-config.json
9-
.idea
10-
11-
# Modules
121
pkg/
132
Gemfile.lock
3+
Gemfile.local
144
vendor/
15-
spec/fixtures/
16-
.bundle/
5+
.vendor/
6+
spec/fixtures/manifests/
7+
spec/fixtures/modules/
178
.vagrant/
9+
.bundle/
10+
.ruby-version
1811
coverage/
19-
20-
# Beaker
21-
.vagrant/
2212
log/
23-
junit/
24-
25-
# OS X metadata
26-
.DS_Store
27-
28-
# Windows junk
29-
Thumbs.db
13+
.idea/
14+
.dependencies/
15+
.librarian/
16+
Puppetfile.lock
17+
*.iml
18+
.*.sw?
19+
.yardoc/
20+
Guardfile

.msync.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
modulesync_config_version: '1.9.2'

.overcommit.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Managed by https://github.com/voxpupuli/modulesync_configs
2+
#
3+
# Hooks are only enabled if you take action.
4+
#
5+
# To enable the hooks run:
6+
#
7+
# ```
8+
# bundle exec overcommit --install
9+
# # ensure .overcommit.yml does not harm to you and then
10+
# bundle exec overcommit --sign
11+
# ```
12+
#
13+
# (it will manage the .git/hooks directory):
14+
#
15+
# Examples howto skip a test for a commit or push:
16+
#
17+
# ```
18+
# SKIP=RuboCop git commit
19+
# SKIP=PuppetLint git commit
20+
# SKIP=RakeTask git push
21+
# ```
22+
#
23+
# Don't invoke overcommit at all:
24+
#
25+
# ```
26+
# OVERCOMMIT_DISABLE=1 git commit
27+
# ```
28+
#
29+
# Read more about overcommit: https://github.com/brigade/overcommit
30+
#
31+
# To manage this config yourself in your module add
32+
#
33+
# ```
34+
# .overcommit.yml:
35+
# unmanaged: true
36+
# ```
37+
#
38+
# to your modules .sync.yml config
39+
---
40+
PreCommit:
41+
RuboCop:
42+
enabled: true
43+
description: 'Runs rubocop on modified files only'
44+
command: ['bundle', 'exec', 'rubocop']
45+
PuppetLint:
46+
enabled: true
47+
description: 'Runs puppet-lint on modified files only'
48+
command: ['bundle', 'exec', 'puppet-lint']
49+
YamlSyntax:
50+
enabled: true
51+
JsonSyntax:
52+
enabled: true
53+
TrailingWhitespace:
54+
enabled: true
55+
56+
PrePush:
57+
RakeTarget:
58+
enabled: true
59+
description: 'Run rake targets'
60+
targets:
61+
- 'test'
62+
- 'rubocop'
63+
command: [ 'bundle', 'exec', 'rake' ]

.pmtignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
docs/
2+
pkg/
3+
Gemfile.lock
4+
Gemfile.local
5+
vendor/
6+
.vendor/
7+
spec/fixtures/manifests/
8+
spec/fixtures/modules/
9+
.vagrant/
10+
.bundle/
11+
.ruby-version
12+
coverage/
13+
log/
14+
.idea/
15+
.dependencies/
16+
.librarian/
17+
Puppetfile.lock
18+
*.iml
19+
.*.sw?
20+
.yardoc/

.rspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--format documentation
2+
--color

.rspec_parallel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--format progress

0 commit comments

Comments
 (0)