|
1 |
| -To ensure the module maintains consistency throughout its lifecycle, please follow the process below to have your PR reviewed |
2 |
| - |
3 |
| -## Contributing |
4 |
| - |
5 |
| -1. Fork the repo. |
6 |
| - |
7 |
| -2. Run the tests. We only take pull requests with passing tests, and |
8 |
| - it's great to know that you have a clean slate |
9 |
| - |
10 |
| -3. Add a test for your change. Only refactoring and documentation |
11 |
| - changes require no new tests. If you are adding functionality |
12 |
| - or fixing a bug, please add a test. |
13 |
| - |
14 |
| -4. Make the test pass. |
15 |
| - |
16 |
| -5. Push to your fork and submit a pull request. |
17 |
| - |
18 |
| - |
19 |
| -## Dependencies |
20 |
| - |
21 |
| -The testing and development tools have a bunch of dependencies, |
22 |
| -all managed by [bundler](http://bundler.io/) according to the |
23 |
| -[Puppet support matrix](http://docs.puppetlabs.com/guides/platforms.html#ruby-versions). |
24 |
| -By default the tests use a baseline version of Puppet. |
25 |
| - |
26 |
| -If you have Ruby 2.x or want a specific version of Puppet, |
27 |
| -you must set an environment variable such as: |
28 |
| - |
29 |
| - export PUPPET_GEM_VERSION="~> 3.2.0" |
30 |
| - |
31 |
| -Install the dependencies like so... |
32 |
| - |
33 |
| - bundle install |
34 |
| - |
35 |
| -...or promote reuse of bundled gems across projects by running: |
36 |
| - |
37 |
| - bundle install --path=~/.bundle |
38 |
| - |
39 |
| -## Syntax and style |
40 |
| - |
41 |
| -The test suite will run [Puppet Lint](http://puppet-lint.com/) and |
42 |
| -[Puppet Syntax](https://github.com/gds-operations/puppet-syntax) to |
43 |
| -check various syntax and style things. You can run these locally with: |
44 |
| - |
45 |
| - bundle exec rake lint |
46 |
| - bundle exec rake syntax |
47 |
| - |
48 |
| -## Running the unit tests |
49 |
| - |
50 |
| -The unit test suite covers most of the code, as mentioned above please |
51 |
| -add tests if you're adding new functionality. If you've not used |
52 |
| -[rspec-puppet](http://rspec-puppet.com/) before then feel free to ask |
53 |
| -about how best to test your new feature. Running the test suite is done |
54 |
| -with: |
55 |
| - |
56 |
| - bundle exec rake spec |
57 |
| - |
58 |
| -Note also you can run the syntax, style and unit tests in one go with: |
59 |
| - |
60 |
| - bundle exec rake test |
61 |
| - |
62 |
| -## Integration tests |
63 |
| - |
64 |
| -The unit tests just check the code runs, not that it does exactly what |
65 |
| -we want on a real machine. For that we're using |
66 |
| -[Beaker](https://github.com/puppetlabs/beaker). |
67 |
| -This fires up a new virtual machine (using vagrant) and runs a series of |
68 |
| -simple tests against it after applying the module. You can run this |
69 |
| -with: |
70 |
| - |
71 |
| - bundle exec rake acceptance |
72 |
| - |
73 |
| -This will run the tests on an Ubuntu 16.04 virtual machine. You can also |
74 |
| -run the integration tests against RHEL, CentOS and Debian. |
75 |
| - |
76 |
| - bundle exec rake acceptance:pooler:centos7 |
77 |
| - bundle exec rake acceptance:pooler:rhel7 |
78 |
| - bundle exec rake acceptance:pooler:ubuntu-1404 |
79 |
| - bundle exec rake acceptance:pooler:ubuntu-1604 |
80 |
| - bundle exec rake acceptance:pooler:ubuntu-1610 |
81 |
| - bundle exec rake acceptance:vagrant:centos-70-x64 |
82 |
| - bundle exec rake acceptance:vagrant:debian-81-x64 |
83 |
| - bundle exec rake acceptance:vagrant:ubuntu-1404-x64 |
84 |
| - bundle exec rake acceptance:vagrant:ubuntu-1604-x64 |
| 1 | +# Contributing to Puppet modules |
85 | 2 |
|
| 3 | +Check out our [Contributing to Supported Modules Blog Post](https://puppetlabs.github.io/iac/docs/contributing_to_a_module.html) to find all the information that you will need. |
0 commit comments