Improve contribution part of this repository (#328)
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/328 Reviewed-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: justusbunsi <justusbunsi@noreply.gitea.io> Co-committed-by: justusbunsi <justusbunsi@noreply.gitea.io>
This commit is contained in:
parent
b3b91e2044
commit
2cc3195eaa
14
.drone.yml
14
.drone.yml
@ -10,24 +10,26 @@ platform:
|
|||||||
steps:
|
steps:
|
||||||
- name: helm lint
|
- name: helm lint
|
||||||
pull: always
|
pull: always
|
||||||
image: alpine:3.15
|
image: alpine:3.16
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
||||||
- helm lint
|
- helm lint
|
||||||
|
|
||||||
- name: helm template
|
- name: helm template
|
||||||
pull: always
|
pull: always
|
||||||
image: alpine:3.15
|
image: alpine:3.16
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
||||||
- helm dependency update
|
- helm dependency update
|
||||||
- helm template --debug gitea-helm .
|
- helm template --debug gitea-helm .
|
||||||
|
|
||||||
- name: markdown lint
|
- name: verify readme
|
||||||
pull: always
|
pull: always
|
||||||
image: docker.io/volkerraschek/markdownlint:latest
|
image: alpine:3.16
|
||||||
commands:
|
commands:
|
||||||
- markdownlint *.md
|
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing make npm git
|
||||||
|
- make readme
|
||||||
|
- git diff --exit-code --name-only README.md
|
||||||
|
|
||||||
- name: discord
|
- name: discord
|
||||||
pull: always
|
pull: always
|
||||||
@ -58,7 +60,7 @@ trigger:
|
|||||||
steps:
|
steps:
|
||||||
- name: generate-chart
|
- name: generate-chart
|
||||||
pull: always
|
pull: always
|
||||||
image: alpine:3.15
|
image: alpine:3.16
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
||||||
- apk add --no-cache curl
|
- apk add --no-cache curl
|
||||||
|
41
.gitea/PULL_REQUEST_TEMPLATE.md
Normal file
41
.gitea/PULL_REQUEST_TEMPLATE.md
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<!--
|
||||||
|
Before you open the request please review the following guidelines and tips to help it be more easily integrated:
|
||||||
|
|
||||||
|
- Describe the scope of your change - i.e. what the change does.
|
||||||
|
- Describe any known limitations with your change.
|
||||||
|
- Please run any tests or examples that can exercise your modified code.
|
||||||
|
|
||||||
|
Thank you for contributing! We will try to review, test and integrate the change as soon as we can.
|
||||||
|
-->
|
||||||
|
|
||||||
|
### Description of the change
|
||||||
|
|
||||||
|
<!-- Describe the scope of your change - i.e. what the change does. -->
|
||||||
|
|
||||||
|
### Benefits
|
||||||
|
|
||||||
|
<!-- What benefits will be realized by the code change? -->
|
||||||
|
|
||||||
|
### Possible drawbacks
|
||||||
|
|
||||||
|
<!-- Describe any known limitations with your change -->
|
||||||
|
|
||||||
|
### Applicable issues
|
||||||
|
|
||||||
|
<!-- Enter any applicable Issues here (You can reference an issue using #). Please remove this section if there is no referenced issue. -->
|
||||||
|
- fixes #
|
||||||
|
|
||||||
|
### Additional information
|
||||||
|
|
||||||
|
<!-- If there's anything else that's important and relevant to your pull request, mention that information here. Please remove this section if it remains empty. -->
|
||||||
|
|
||||||
|
### ⚠ BREAKING
|
||||||
|
|
||||||
|
<!-- If there's a breaking change, please shortly describe in which way users are affected and how they can mitigate it. If there are no breakings, please remove this section. -->
|
||||||
|
|
||||||
|
### Checklist
|
||||||
|
|
||||||
|
<!-- [Place an '[X]' (no spaces) in all applicable fields. Please remove unrelated fields.] -->
|
||||||
|
|
||||||
|
- [ ] Parameters are documented in the `values.yaml` and added to the `README.md` using [readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm)
|
||||||
|
- [ ] Breaking changes are documented in the `README.md`
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
charts
|
charts/
|
||||||
|
node_modules/
|
||||||
Chart.lock
|
Chart.lock
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
@ -20,5 +20,8 @@
|
|||||||
.idea/
|
.idea/
|
||||||
*.tmproj
|
*.tmproj
|
||||||
.vscode/
|
.vscode/
|
||||||
#charts/
|
node_modules/
|
||||||
#Chart.lock
|
.npmrc
|
||||||
|
package.json
|
||||||
|
package-lock.json
|
||||||
|
.gitea/
|
||||||
|
3
.markdownlintignore
Normal file
3
.markdownlintignore
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.gitea/
|
||||||
|
node_modules/
|
||||||
|
charts/
|
52
CONTRIBUTING.md
Normal file
52
CONTRIBUTING.md
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
When using Visual Studio Code as IDE, following plugins might be useful:
|
||||||
|
|
||||||
|
- [Markdown All in One](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one)
|
||||||
|
- [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint)
|
||||||
|
- [Helm Intellisense](https://marketplace.visualstudio.com/items?itemName=Tim-Koehler.helm-intellisense)
|
||||||
|
|
||||||
|
## 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](https://github.com/bitnami-labs/readme-generator-for-helm).
|
||||||
|
|
||||||
|
If changes were made on configuration options, run `make readme` to update the
|
||||||
|
README file.
|
||||||
|
|
||||||
|
## 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`.
|
||||||
|
2. Start a `minikube` cluster via `minikube start`.
|
||||||
|
3. 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`.
|
||||||
|
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](http://localhost:3000).
|
21
Makefile
21
Makefile
@ -1,15 +1,8 @@
|
|||||||
readme: helm-doc
|
.PHONY: prepare-environment
|
||||||
readme-generator -v values.yaml -r README.md
|
prepare-environment:
|
||||||
markdownlint *.md -f
|
npm install
|
||||||
|
|
||||||
.PHONY: helm-doc
|
.PHONY: readme
|
||||||
helm-doc:
|
readme: prepare-environment
|
||||||
ifeq (, $(shell which readme-generator))
|
npm run readme:parameters
|
||||||
@{ \
|
npm run readme:lint
|
||||||
set -e ;\
|
|
||||||
echo 'installing readme-generator-for-helm' ;\
|
|
||||||
npm install -g readme-generator-for-helm ;\
|
|
||||||
}
|
|
||||||
else
|
|
||||||
echo 'readme-generator-for-helm is already installed'
|
|
||||||
endif
|
|
||||||
|
17
README.md
17
README.md
@ -927,19 +927,8 @@ gitea:
|
|||||||
| ------------------ | ---------------------------------------------------- | ------ |
|
| ------------------ | ---------------------------------------------------- | ------ |
|
||||||
| `checkDeprecation` | Set it to false to skip this basic validation check. | `true` |
|
| `checkDeprecation` | Set it to false to skip this basic validation check. | `true` |
|
||||||
|
|
||||||
## Local development & testing
|
## Contributing
|
||||||
|
|
||||||
For local development and testing of pull requests, the following workflow can
|
Expected workflow is: Fork -> Patch -> Push -> Pull Request
|
||||||
be used:
|
|
||||||
|
|
||||||
1. Install `minikube` and `helm`.
|
See [CONTRIBUTORS GUIDE](CONTRIBUTING.md) for details.
|
||||||
2. Start a `minikube` cluster via `minikube start`.
|
|
||||||
3. 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`.
|
|
||||||
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](http://localhost:3000).
|
|
||||||
|
721
package-lock.json
generated
Normal file
721
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
19
package.json
Normal file
19
package.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "gitea-helm-chart",
|
||||||
|
"homepage": "https://gitea.com/gitea/helm-chart.git",
|
||||||
|
"license": "MIT",
|
||||||
|
"private": true,
|
||||||
|
"engineStrict": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16.0.0",
|
||||||
|
"npm": ">=8.0.0"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"readme:lint": "markdownlint *.md -f",
|
||||||
|
"readme:parameters": "readme-generator -v values.yaml -r README.md"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"markdownlint-cli": "^0.31.1",
|
||||||
|
"readme-generator-for-helm": "https://github.com/bitnami-labs/readme-generator-for-helm/tarball/main"
|
||||||
|
}
|
||||||
|
}
|
@ -389,7 +389,7 @@ gitea:
|
|||||||
## @section Memcached
|
## @section Memcached
|
||||||
#
|
#
|
||||||
## @param memcached.enabled Memcached is loaded as a dependency from [Bitnami](https://github.com/bitnami/charts/tree/master/bitnami/memcached) if enabled in the values. Complete Configuration can be taken from their website.
|
## @param memcached.enabled Memcached is loaded as a dependency from [Bitnami](https://github.com/bitnami/charts/tree/master/bitnami/memcached) if enabled in the values. Complete Configuration can be taken from their website.
|
||||||
## @param memcached.service.port Port for memcached
|
## @param memcached.service.port Port for Memcached
|
||||||
memcached:
|
memcached:
|
||||||
enabled: true
|
enabled: true
|
||||||
service:
|
service:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user