2022-06-13 03:35:24 +08:00
# Contribution Guidelines
Any type of contribution is welcome; from new features, bug fixes, tests,
refactorings for easier maintainability or documentation improvements.
## Development environment
- [`node` ](https://nodejs.org/en/ ) at least current LTS
- [`helm` ](https://helm.sh/docs/intro/install/ )
- `make` is optional; you may call the commands directly
2023-10-13 19:20:26 +00:00
When using Visual Studio Code as IDE, a [ready-to-use profile ](.vscode/ ) is available.
2022-06-13 03:35:24 +08:00
## Documentation Requirements
2023-06-28 06:54:22 +00:00
The `README.md` must include all configuration options.
The parameters section is generated by extracting the parameter annotations from the `values.yaml` file, by using [this tool ](https://github.com/bitnami-labs/readme-generator-for-helm ).
2022-06-13 03:35:24 +08:00
2023-06-28 06:54:22 +00:00
If changes were made on configuration options, run `make readme` to update the README file.
The ToC is created via the VSCode [Markdown All in One ](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one ) extension which can/must also be used used to update it.
2022-06-13 03:35:24 +08:00
## Pull Request Requirements
When submitting or updating a PR:
- make sure it passes CI builds.
- do not make independent changes in one PR.
- try to avoid rebases. They make code reviews for large PRs and comments much harder.
- if applicable, use the PR template for a well-defined PR description.
- clearly mark breaking changes.
## Local development & testing
For local development and testing of pull requests, the following workflow can
be used:
1. Install `minikube` and `helm` .
2023-06-28 06:54:22 +00:00
1. Start a `minikube` cluster via `minikube start` .
1. From the `gitea/helm-chart` directory execute the following command.
This will install the dependencies listed in `Chart.yml` and deploy the current state of the helm chart found locally.
If you want to test a branch, make sure to switch to the respective branch first.
`helm install --dependency-update gitea . -f values.yaml` .
1. Gitea is now deployed in `minikube` .
To access it, it's port needs to be forwarded first from `minikube` to localhost first via `kubectl --namespace
default port-forward svc/gitea-http 3000:3000`.
Now Gitea is accessible at [http://localhost:3000 ](http://localhost:3000 ).
2023-01-18 00:58:10 +08:00
### Unit tests
```bash
# install the unittest plugin
2023-03-21 23:53:13 +08:00
$ helm plugin install https://github.com/helm-unittest/helm-unittest
2023-01-18 00:58:10 +08:00
# run the unittests
make unittests
```
2023-05-31 08:47:58 +00:00
2023-10-13 19:20:26 +00:00
See [plugin documentation ](https://github.com/helm-unittest/helm-unittest/blob/main/DOCUMENT.md ) for usage instructions.
2023-07-17 21:19:48 +02:00
## Release process
1. Create a tag following the tagging schema
1. Push the tag
2023-07-18 08:27:11 +02:00
1. Let CI do it's work