fix(Makefile): update targets and add link checker

This commit is contained in:
2026-09-13 22:51:05 +02:00
parent dee7e1f0f6
commit c510e06609
8 changed files with 992 additions and 55 deletions
+10 -9
View File
@@ -1,20 +1,21 @@
---
extends: default
ignore: |
charts
.yamllint
node_modules
templates
unittests/bash
rules:
truthy:
allowed-values: ['true', 'false']
check-keys: False
level: error
line-length: disable
document-start: disable
comments:
min-spaces-from-content: 1
braces:
max-spaces-inside: 2
comments:
min-spaces-from-content: 1
comments-indentation: disable
document-start: disable
line-length: disable
truthy:
allowed-values: ['true', 'false']
check-keys: false
level: error
+5 -6
View File
@@ -37,15 +37,14 @@ For local development and testing of pull requests, the following workflow can
be used:
1. Install `minikube` and `helm`.
1. Start a `minikube` cluster via `minikube start`.
1. From the `gitea/helm-gitea` directory execute the following command.
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`.
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).
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
`localhost:3000`.
### Unit tests
+44 -19
View File
@@ -1,29 +1,54 @@
SHELL := /usr/bin/env bash -O globstar
.PHONY: prepare-environment
prepare-environment:
npm install
# MISSING DOT
# ==============================================================================
PHONY+=missing-dot
missing-dot:
grep --perl-regexp '## @(param|skip).*[^.]$$' values.yaml
.PHONY: readme
readme: prepare-environment
npm run readme:parameters
npm run readme:lint
# README
# ==============================================================================
PHONY+=readme
readme: readme/link readme/lint readme/parameters
.PHONY: unittests
unittests: unittests-helm unittests-bash
PHONY+=readme/link
readme/link:
npm install && npm run readme:link
.PHONY: unittests-helm
unittests-helm:
helm unittest --strict -f 'unittests/helm/**/*.yaml' -f 'unittests/helm/values-conflicting-checks.yaml' ./
PHONY+=readme/lint
readme/lint:
npm install && npm run readme:lint
.PHONY: unittests-bash
unittests-bash:
./unittests/bash/bats/bin/bats --pretty ./unittests/bash/tests/**/*.bats
PHONY+=readme/parameters
readme/parameters:
npm install && npm run readme:parameters
.PHONY: update-helm-dependencies
update-helm-dependencies:
# HELM DEPENDENCIES
# ==============================================================================
PHONY+=helm/dependency-update
helm/dependency-update:
helm dependency update
.PHONY: yamllint
# HELM UNITTESTS
# ==============================================================================
PHONY+=helm/unittest
helm/unittest:
helm unittest --strict --file 'unittests/helm/**/*.yaml' --file 'unittests/helm/values-conflicting-checks.yaml' ./
# BASH UNITTESTS
# ==============================================================================
PHONY+=bash/unittest
bash/unittest:
./unittests/bash/bats/bin/bats --pretty ./unittests/bash/tests/**/*.bats
# YAML LINT
# ==============================================================================
PHONY+=yamllint
yamllint:
yamllint -c .yamllint .
yamllint -c .yamllint.yaml .
# PHONY
# ==============================================================================
# Declare the contents of the PHONY variable as phony. We keep that information
# in a variable so we can use it in if_changed.
.PHONY: ${PHONY}
+10 -8
View File
@@ -15,9 +15,10 @@
- [Server defaults](#server-defaults)
- [Metrics defaults](#metrics-defaults)
- [Rootless Defaults](#rootless-defaults)
- [OpenShift Compatibility](#openshift-compatibility)
- [Gateway API](#gateway-api)
- [Session, Cache and Queue](#session-cache-and-queue)
- [Single-Pod Configurations](#single-pod-configurations)
- [Additional _app.ini_ settings](#additional-appini-settings)
- [User defined environment variables in app.ini](#user-defined-environment-variables-in-appini)
- [External Database](#external-database)
- [Ports and external url](#ports-and-external-url)
@@ -33,13 +34,14 @@
- [Metrics and profiling](#metrics-and-profiling)
- [Secure Metrics Endpoint](#secure-metrics-endpoint)
- [Pod annotations](#pod-annotations)
- [Secret checksum annotations](#secret-checksum-annotations)
- [TLS certificate rotation](#tls-certificate-rotation)
- [Themes](#themes)
- [Renovate](#renovate)
- [Parameters](#parameters)
- [Global](#global)
- [deployment](#deployment)
- [Gateway API](#gateway-api)
- [Gateway API](#gateway-api-1)
- [Ingress](#ingress)
- [Network](#network)
- [Image](#image)
@@ -483,7 +485,7 @@ Priority (highest to lowest) for defining app.ini variables:
### External Database
Any external database listed in [https://docs.gitea.com/installation/database-prep](https://docs.gitea.com/installation/database-prep) can be used instead of the built-in PostgreSQL.
Any external database listed in [https://docs.gitea.com/installation/database-prep/](https://docs.gitea.com/installation/database-prep/) can be used instead of the built-in PostgreSQL.
In fact, it is **highly recommended** to use an external database to ensure a stable Gitea installation longterm.
If an external database is used, no matter which type, make sure to set `postgresql.enabled` to `false` to disable the use of the built-in PostgreSQL.
@@ -1033,8 +1035,8 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
| `deployment.labels` | Labels for the deployment | `{}` |
| `deployment.affinity` | Affinity for the deployment. | `{}` |
| `deployment.dnsConfig` | dnsConfig of the Gitea deployment. | `{}` |
| `deployment.gitea.env` | Additional environment variables to pass to the Gitea container. | `[]` |
| `deployment.gitea.envFrom` | List of environment variables mounted from configMaps or secrets for the Gitea container. | `[]` |
| `deployment.gitea.env` | Additional environment variables to pass to the gitea container. | `[]` |
| `deployment.gitea.envFrom` | List of environment variables mounted from configMaps or secrets for the gitea container. | `[]` |
| `deployment.gitea.image.registry` | image registry, e.g. gcr.io,docker.io | `docker.gitea.com` |
| `deployment.gitea.image.repository` | Image to start for this pod | `gitea` |
| `deployment.gitea.image.tag` | Visit: [Image tag](https://hub.docker.com/r/gitea/gitea/tags?page=1&ordering=last_updated). Defaults to `appVersion` within Chart.yaml. | `""` |
@@ -1120,7 +1122,7 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
| `gatewayAPI.core.backendTLSPolicy.targetRefs` | Target references for the BackendTLSPolicy. Defaults to the HTTP service. | `[]` |
| `gatewayAPI.core.backendTLSPolicy.validation` | Validation configuration (required when enabled). See `docs/gateway-api.md`. | `{}` |
| `gatewayAPI.core.backendTLSPolicy.validation.caCertificateRefs` | CA certificate references for the BackendTLSPolicy validation. See `docs/gateway-api.md`. | |
| `gatewayAPI.core.backendTLSPolicy.validation.hostname` | Hostname for the BackendTLSPolicy validation. Must be the Common Name (CN) or a Subject Alternative Name (SAN) of the Gitea server certificate. See `docs/gateway-api.md`. | |
| `gatewayAPI.core.backendTLSPolicy.validation.hostname` | Hostname for the BackendTLSPolicy validation. Must be the Common Name (CN) or a Subject Alternative Name (SAN) of the gitea server certificate. See `docs/gateway-api.md`. | |
| `gatewayAPI.core.httpRoute.enabled` | Render an HTTPRoute resource | `false` |
| `gatewayAPI.core.httpRoute.annotations` | Annotations applied to the HTTPRoute | `{}` |
| `gatewayAPI.core.httpRoute.labels` | Additional labels applied to the HTTPRoute | `{}` |
@@ -1151,7 +1153,7 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
| `ingress.hosts[0].host` | Default Ingress host | `git.example.com` |
| `ingress.hosts[0].paths[0].path` | Default Ingress path | `/` |
| `ingress.tls` | Ingress tls settings | `[]` |
| `namespace` | An explicit namespace to deploy Gitea into. Defaults to the release namespace if not specified | `""` |
| `namespace` | An explicit namespace to deploy gitea into. Defaults to the release namespace if not specified | `""` |
### Network
@@ -1211,7 +1213,7 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
| `secrets.config.existingSecret.secretName` | Name of the already existing config Secret | `""` |
| `secrets.config.new.annotations` | Annotations for the config Secret | `{}` |
| `secrets.config.new.labels` | Labels for the config Secret | `{}` |
| `secrets.gpg.enabled` | Enable mounting of a GPG key to sign Git commits. | `false` |
| `secrets.gpg.enabled` | Enable mounting of a GPG key to sign git commits. | `false` |
| `secrets.gpg.addSHASumAnnotation` | Add a pod annotation with the SHA sum of the GPG key Secret to trigger a rollout on change. Further information can be found in the [documentation](./README.md#secret-checksum-annotation). | `false` |
| `secrets.gpg.existingSecret.enabled` | Use an already existing Secret instead of creating the GPG key Secret | `false` |
| `secrets.gpg.existingSecret.secretName` | Name of the already existing GPG key Secret | `""` |
+908
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -9,11 +9,13 @@
"npm": ">=8.0.0"
},
"scripts": {
"readme:link": "markdown-link-check *.md",
"readme:lint": "markdownlint *.md -f",
"readme:parameters": "readme-generator -v values.yaml -r README.md"
},
"devDependencies": {
"@bitnami/readme-generator-for-helm": "^2.5.0",
"markdown-link-check": "^3.13.6",
"markdownlint-cli": "^0.49.0"
}
}