CONTRIBUTING.md 2.8 KB
Newer Older
Robert de Bock's avatar
Robert de Bock committed
1
# [Please contribute](#please-contribute)
2

Robert de Bock's avatar
Robert de Bock committed
3
You can really make a difference by:
4

5
- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).)
Robert de Bock's avatar
Robert de Bock committed
6
- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code.
7
8
9
10

I'll try to help and take every contribution seriously.

It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software.
Robert de Bock's avatar
Robert de Bock committed
11

Robert de Bock's avatar
Robert de Bock committed
12
## [Step by step](#step-by-step)
Robert de Bock's avatar
Robert de Bock committed
13
14
15

Here is how you can help, a lot of steps are related to GitHub, not specifically my roles.

Robert de Bock's avatar
Robert de Bock committed
16
### [1. Make an issue.](#1-make-an-issue)
Robert de Bock's avatar
Robert de Bock committed
17

Robert de Bock's avatar
Robert de Bock committed
18
When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-lynis/issues).
Robert de Bock's avatar
Robert de Bock committed
19
20
21

Making the issue help me and others to find similar problems in the future.

Robert de Bock's avatar
Robert de Bock committed
22
### [2. Fork the project.](#2-fork-the-project)
Robert de Bock's avatar
Robert de Bock committed
23

Robert de Bock's avatar
Robert de Bock committed
24
On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-lynis), click `fork`. This copies everything to your GitHub namespace.
Robert de Bock's avatar
Robert de Bock committed
25

Robert de Bock's avatar
Robert de Bock committed
26
### [3. Make the changes](#3-make-the-changes)
Robert de Bock's avatar
Robert de Bock committed
27
28
29
30
31
32

In you own GitHub namespace, make the required changes.

I typically do that by cloning the repository (in your namespace) locally:

```
Robert de Bock's avatar
Robert de Bock committed
33
git clone git@github.com:YOURNAMESPACE/ansible-role-lynis.git
Robert de Bock's avatar
Robert de Bock committed
34
35
36
37
```

Now you can start to edit on your laptop.

Robert de Bock's avatar
Robert de Bock committed
38
### [4. Optionally: test your changes](#4-optionally-test-your-changes)
Robert de Bock's avatar
Robert de Bock committed
39
40
41
42

Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/):

```
Robert de Bock's avatar
Robert de Bock committed
43
pip install molecule tox ansible-lint docker
Robert de Bock's avatar
Robert de Bock committed
44
45
46
47
48
49
50
51
52
53
54
55
56
57
```

And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`:

```
image=centos tag=7 molecule test
```

Once it start to work, you can test multiple version of Ansible:

```
image=centos tag=7 tox
```

Robert de Bock's avatar
Robert de Bock committed
58
### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content)
Robert de Bock's avatar
Robert de Bock committed
59
60
61
62
63

You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content.

If you don't do it, I'll do it later for you.

Robert de Bock's avatar
Robert de Bock committed
64
### [6. Make a pull request](#6-make-a-pull-request)
Robert de Bock's avatar
Robert de Bock committed
65
66
67
68
69

[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests.

In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number.

Robert de Bock's avatar
Robert de Bock committed
70
### [7. Wait](#7-wait)
Robert de Bock's avatar
Robert de Bock committed
71
72
73
74

Now I'll get a message that you've added some code. Thank you, really.

CI starts to test your changes. You can follow the progress on Travis.
Robert de Bock's avatar
Robert de Bock committed
75
76

Please consider [sponsoring me](https://github.com/sponsors/robertdebock).