ContainerImage.Pinniped/doc/contributing.md

80 lines
2.4 KiB
Markdown
Raw Normal View History

# Contributing to Pinniped
2020-08-27 17:14:03 +00:00
Contributions to Pinniped are welcome. Here are some things to help you get started.
1. Please see the [Code of Conduct](code_of_conduct.md).
2020-08-27 17:14:03 +00:00
1. Learn about the [scope](scope.md) of the project.
1. Coming soon: details about how to legally contribute to the project, including CLA/DCO details.
1. See below for how to [file a bug report](#bugs).
1. See below for how to [suggest a feature](#features).
1. See below for how to [build the code](#building).
1. See below for how to [run the tests](#testing).
## Bugs
To file a bug report, please first open an
[issue](https://github.com/suzerain-io/pinniped/issues/new?template=bug_report.md). The project team
will work with you on your bug report.
Once the bug has been validated, a [pull request](https://github.com/suzerain-io/pinniped/compare)
2020-08-27 17:14:03 +00:00
can be opened to fix the bug.
For specifics on what to include in your bug report, please follow the
2020-08-27 17:14:03 +00:00
guidelines in the issue and pull request templates.
## Features
To suggest a feature, please first open an
2020-08-27 17:14:03 +00:00
[issue](https://github.com/suzerain-io/pinniped/issues/new?template=feature-proposal.md)
and tag it with `proposal`. The project team will work with you on your feature request.
Once the feature request has been validated, a [pull request](https://github.com/suzerain-io/pinniped/compare)
2020-08-27 17:14:03 +00:00
can be opened to implement the feature.
For specifics on what to include in your feature request, please follow the
2020-08-27 17:14:03 +00:00
guidelines in the issue and pull request templates.
## Building
2020-08-27 17:14:03 +00:00
The [Dockerfile](../Dockerfile) at the root of the repo can be used to build and
package the code. After making a change to the code, rebuild the docker image with the following command.
2020-08-27 17:14:03 +00:00
```bash
# From the root directory of the repo...
docker build .
```
## Testing
### Running Lint
2020-08-27 17:14:03 +00:00
```bash
./hack/module.sh lint
```
### Running Unit Tests
2020-08-27 17:14:03 +00:00
```bash
./hack/module.sh units
```
### Running Integration Tests
```bash
./hack/prepare-for-integration-tests.sh && source /tmp/integration-test-env && go test -v -count 1 ./test/...
```
The `./hack/prepare-for-integration-tests.sh` script will create a local
[`kind`](https://kind.sigs.k8s.io/) cluster on which the integration tests will run.
2020-08-27 17:14:03 +00:00
### Pre-commit Hooks
2020-08-27 17:14:03 +00:00
This project uses [pre-commit](https://pre-commit.com/) to agree on some conventions about whitespace/file encoding.
2020-08-27 17:14:03 +00:00
```bash
$ brew install pre-commit
[...]
$ pre-commit install
pre-commit installed at .git/hooks/pre-commit
```