helm-gitea/CONTRIBUTING.md
pat-s 8f35f45e31 chore: execute releases via git-sv (#865)
Following the creation of the changelog via `git-sv`, the release process can also be simplified.

The new approach only requires to call `git sv tag` from a Maintainer with write access to the repo.
This will create and push the tag.
The release notes and subsequent Gitea release will then be created by the new workflow job.

Reviewed-on: https://gitea.com/gitea/helm-gitea/pulls/865
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2025-05-16 13:11:07 +00:00

3.1 KiB

Contribution Guidelines

Any type of contribution is welcome; from new features, bug fixes, tests, refactorings for easier maintainability or documentation improvements.

Development environment

  • node at least current LTS
  • helm
  • make is optional; you may call the commands directly

When using Visual Studio Code as IDE, a ready-to-use profile is available.

Documentation Requirements

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.

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 extension which can/must also be used used to update it.

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.
  • format the PR title following the conventional commits schema

Local development & testing

For local development and testing of pull requests, the following workflow can be used:

  1. Install minikube and helm.
  2. Start a minikube cluster via minikube start.
  3. From the gitea/helm-gitea 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.
  4. 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.

Unit tests

Helm templating tests

# install the unittest plugin
$ helm plugin install https://github.com/helm-unittest/helm-unittest

# run the Helm unittests
make unittests-helm

See plugin documentation for usage instructions.

Bash script tests

# setup the environment
git submodule update --init --recursive

# run the bash tests
make unittests-bash

See bats documentation for usage instructions.

Release process

  1. Ensure you have git-sv installed
  2. Run git sv tag (this creates and pushes the tag following the respective next tag according to the semver commits issued since the last release)
  3. Let CI do it's work