Skip to content

Commit 7ca8ba0

Browse files
committed
Modulesync 2.12.0
1 parent 2218071 commit 7ca8ba0

File tree

9 files changed

+147
-229
lines changed

9 files changed

+147
-229
lines changed

.github/CONTRIBUTING.md

Lines changed: 112 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Contribution guidelines
2+
3+
## Table of contents
4+
5+
* [Contributing](#contributing)
6+
* [Writing proper commits - short version](#writing-proper-commits-short-version)
7+
* [Writing proper commits - long version](#writing-proper-commits-long-version)
8+
* [Dependencies](#dependencies)
9+
* [Note for OS X users](#note-for-os-x-users)
10+
* [The test matrix](#the-test-matrix)
11+
* [Syntax and style](#syntax-and-style)
12+
* [Running the unit tests](#running-the-unit-tests)
13+
* [Unit tests in docker](#unit-tests-in-docker)
14+
* [Integration tests](#integration-tests)
15+
116
This module has grown over time based on a range of contributions from
217
people using it. If you follow these contributing guidelines your patch
318
will likely make it into a release a little more quickly.
@@ -8,29 +23,92 @@ Please note that this project is released with a Contributor Code of Conduct.
823
By participating in this project you agree to abide by its terms.
924
[Contributor Code of Conduct](https://voxpupuli.org/coc/).
1025

11-
1. Fork the repo.
12-
13-
1. Create a separate branch for your change.
14-
15-
1. We only take pull requests with passing tests, and documentation. [travis-ci](http://travis-ci.org)
16-
runs the tests for us. You can also execute them locally. This is explained
17-
in a later section.
18-
19-
1. Checkout [our docs](https://voxpupuli.org/docs/#reviewing-a-module-pr) we
20-
use to review a module and the [official styleguide](https://puppet.com/docs/puppet/6.0/style_guide.html).
21-
They provide some guidance for new code that might help you before you submit a pull request.
22-
23-
1. Add a test for your change. Only refactoring and documentation
24-
changes require no new tests. If you are adding functionality
25-
or fixing a bug, please add a test.
26-
27-
1. Squash your commits down into logical components. Make sure to rebase
28-
against our current master.
29-
30-
1. Push the branch to your fork and submit a pull request.
31-
32-
Please be prepared to repeat some of these steps as our contributors review
33-
your code.
26+
* Fork the repo.
27+
* Create a separate branch for your change.
28+
* We only take pull requests with passing tests, and documentation. [travis-ci](http://travis-ci.org) runs the tests for us. You can also execute them locally. This is explained [in a later section](#the-test-matrix).
29+
* Checkout [our docs](https://voxpupuli.org/docs/reviewing_pr/) we use to review a module and the [official styleguide](https://puppet.com/docs/puppet/6.0/style_guide.html). They provide some guidance for new code that might help you before you submit a pull request.
30+
* Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, please add a test.
31+
* Squash your commits down into logical components. Make sure to rebase against our current master.
32+
* Push the branch to your fork and submit a pull request.
33+
34+
Please be prepared to repeat some of these steps as our contributors review your code.
35+
36+
## Writing proper commits - short version
37+
38+
* Make commits of logical units.
39+
* Check for unnecessary whitespace with "git diff --check" before committing.
40+
* Commit using Unix line endings (check the settings around "crlf" in git-config(1)).
41+
* Do not check in commented out code or unneeded files.
42+
* The first line of the commit message should be a short description (50 characters is the soft limit, excluding ticket number(s)), and should skip the full stop.
43+
* Associate the issue in the message. The first line should include the issue number in the form "(#XXXX) Rest of message".
44+
* The body should provide a meaningful commit message, which:
45+
*uses the imperative, present tense: `change`, not `changed` or `changes`.
46+
* includes motivation for the change, and contrasts its implementation with the previous behavior.
47+
* Make sure that you have tests for the bug you are fixing, or feature you are adding.
48+
* Make sure the test suites passes after your commit:
49+
* When introducing a new feature, make sure it is properly documented in the README.md
50+
51+
## Writing proper commits - long version
52+
53+
1. Make separate commits for logically separate changes.
54+
55+
Please break your commits down into logically consistent units
56+
which include new or changed tests relevant to the rest of the
57+
change. The goal of doing this is to make the diff easier to
58+
read for whoever is reviewing your code. In general, the easier
59+
your diff is to read, the more likely someone will be happy to
60+
review it and get it into the code base.
61+
62+
If you are going to refactor a piece of code, please do so as a
63+
separate commit from your feature or bug fix changes.
64+
65+
We also really appreciate changes that include tests to make
66+
sure the bug is not re-introduced, and that the feature is not
67+
accidentally broken.
68+
69+
Describe the technical detail of the change(s). If your
70+
description starts to get too long, that is a good sign that you
71+
probably need to split up your commit into more finely grained
72+
pieces.
73+
74+
Commits which plainly describe the things which help
75+
reviewers check the patch and future developers understand the
76+
code are much more likely to be merged in with a minimum of
77+
bike-shedding or requested changes. Ideally, the commit message
78+
would include information, and be in a form suitable for
79+
inclusion in the release notes for the version of Puppet that
80+
includes them.
81+
82+
Please also check that you are not introducing any trailing
83+
whitespace or other "whitespace errors". You can do this by
84+
running "git diff --check" on your changes before you commit.
85+
86+
2. Sending your patches
87+
88+
To submit your changes via a GitHub pull request, we _highly_
89+
recommend that you have them on a topic branch, instead of
90+
directly on `master`.
91+
It makes things much easier to keep track of, especially if
92+
you decide to work on another thing before your first change
93+
is merged in.
94+
95+
GitHub has some pretty good
96+
[general documentation](http://help.github.com/) on using
97+
their site. They also have documentation on
98+
[creating pull requests](http://help.github.com/send-pull-requests/).
99+
100+
In general, after pushing your topic branch up to your
101+
repository on GitHub, you can switch to the branch in the
102+
GitHub UI and click "Pull Request" towards the top of the page
103+
in order to open a pull request.
104+
105+
106+
3. Update the related GitHub issue.
107+
108+
If there is a GitHub issue associated with the change you
109+
submitted, then you should update the ticket to include the
110+
location of your branch, along with any other commentary you
111+
may wish to make.
34112

35113
## Dependencies
36114

@@ -75,13 +153,15 @@ BUNDLE_JOBS="$(nproc)"
75153

76154
### Note for OS X users
77155

78-
`nproc` isn't a valid command unter OS x. As an alternative, you can do:
156+
`nproc` isn't a valid command under OS x. As an alternative, you can do:
79157

80158
```sh
81159
--jobs "$(sysctl -n hw.ncpu)"
82160
```
83161

84-
## Syntax and style
162+
## The test matrix
163+
164+
### Syntax and style
85165

86166
The test suite will run [Puppet Lint](http://puppet-lint.com/) and
87167
[Puppet Syntax](https://github.com/gds-operations/puppet-syntax) to
@@ -99,7 +179,7 @@ against it. You can run those locally ahead of time with:
99179
bundle exec rake rubocop
100180
```
101181

102-
## Running the unit tests
182+
### Running the unit tests
103183

104184
The unit test suite covers most of the code, as mentioned above please
105185
add tests if you're adding new functionality. If you've not used
@@ -124,7 +204,7 @@ To run a specific spec test set the `SPEC` variable:
124204
bundle exec rake spec SPEC=spec/foo_spec.rb
125205
```
126206

127-
### Unit tests in docker
207+
#### Unit tests in docker
128208

129209
Some people don't want to run the dependencies locally or don't want to install
130210
ruby. We ship a Dockerfile that enables you to run all unit tests and linting.
@@ -139,7 +219,7 @@ permission to talk to it. You can specify a remote docker host by setting the
139219
`DOCKER_HOST` environment variable. it will copy the content of the module into
140220
the docker image. So it will not work if a Gemfile.lock exists.
141221

142-
## Integration tests
222+
### Integration tests
143223

144224
The unit tests just check the code runs, not that it does exactly what
145225
we want on a real machine. For that we're using
@@ -176,18 +256,20 @@ Beaker also supports docker containers. We also use that in our automated CI
176256
pipeline at [travis-ci](http://travis-ci.org). To use that instead of Vagrant:
177257

178258
```sh
179-
PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64{hypervisor=docker} BEAKER_destroy=yes bundle exec rake beaker
259+
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
180260
```
181261

182-
You can replace the string `debian9` with any common operating system.
262+
You can replace the string `debian10` with any common operating system.
183263
The following strings are known to work:
184264

185265
* ubuntu1604
186266
* ubuntu1804
187267
* debian8
188268
* debian9
269+
* debian10
189270
* centos6
190271
* centos7
272+
* centos8
191273

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

.msync.yml

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

.rubocop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require: rubocop-rspec
22
AllCops:
3+
# Puppet Server 5 defaults to jruby 1.7 so TargetRubyVersion must stay at 1.9 until we drop support for puppet 5
34
TargetRubyVersion: 1.9
45
Include:
56
- ./**/*.rb

.travis.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
dist: xenial
2+
dist: bionic
33
language: ruby
44
cache: bundler
55
before_install:
6-
- gem update --system
7-
- gem update bundler
6+
- yes | gem update --system
87
- bundle --version
98
script:
109
- 'bundle exec rake $CHECK'
@@ -25,26 +24,27 @@ matrix:
2524
env: PUPPET_VERSION="~> 5.0" CHECK=build DEPLOY_TO_FORGE=yes
2625
- rvm: 2.5.3
2726
bundler_args: --without development release
28-
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
27+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
2928
services: docker
3029
- rvm: 2.5.3
3130
bundler_args: --without development release
32-
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
31+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
3332
services: docker
3433
- rvm: 2.5.3
3534
bundler_args: --without development release
36-
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
35+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
3736
services: docker
3837
- rvm: 2.5.3
3938
bundler_args: --without development release
40-
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
39+
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian9-64 BEAKER_HYPERVISOR=docker CHECK=beaker
4140
services: docker
4241
branches:
4342
only:
4443
- master
4544
- /^v\d/
4645
notifications:
4746
email: false
47+
webhooks: https://voxpupu.li/incoming/travis
4848
irc:
4949
on_success: always
5050
on_failure: always

CONTRIBUTING.md

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

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN bundle install --without system_tests development release --path=${BUNDLE_PA
1515
COPY . .
1616

1717
RUN bundle install
18-
RUN bundle exec release_checks
18+
RUN bundle exec rake release_checks
1919

2020
# Container should not saved
2121
RUN exit 1

0 commit comments

Comments
 (0)