From 71c3b750425cc9fa3e8dae4285ae833e462a1538 Mon Sep 17 00:00:00 2001 From: Henning Bredel Date: Mon, 14 Aug 2023 11:04:30 +0200 Subject: [PATCH] Issue#56 ensure helm docs has been run before commit (#57) * Add pre-commit config * Add contribution section to README * Fix path to README --- .pre-commit-config.yaml | 15 +++++++++++++++ README.md | 22 ++++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..31de97e --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,15 @@ +repos: + - repo: https://github.com/norwoodj/helm-docs + rev: v1.2.0 + hooks: + - id: helm-docs + args: + # Make the tool search for charts only under the `example-charts` directory + - --chart-search-root=deployment/geonode + + # The `./` makes it relative to the chart-search-root set above + #- --template-files=./_templates.gotmpl + + # Repeating the flag adds this to the list, now [./_templates.gotmpl, README.md.gotmpl] + # A base filename makes it relative to each chart directory found + #- --template-files=README.md.gotmpl \ No newline at end of file diff --git a/README.md b/README.md index df8c025..2c508d2 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,6 @@ # Helm Chart for Geonode -Table of Contents -================= - [GeoWhat?](#Geonode) - [Geonode-k8s](#geonode-k8s) - [Install Guilde](#install) @@ -82,3 +80,23 @@ helm upgrade --cleanup-on-fail --install --namespace geonode --create-namespac ```bash helm delete --namespace geonode geonode deployment/geonode ``` + +## Contribution + +### Create an Issue + +You found a bug :lady_beetle:? +You have an idea how to improve :bulb:? +Feel free to [create an issue](https://github.com/zalf-rdm/geonode-k8s/issues/new/choose)! + + +### Documentation + +Ensure values.yaml documentation is up-to-date. +The [parameter documentation](deployment/geonode/README.md) is generated via [`helm-docs`](https://github.com/norwoodj/helm-docs). +There is a pre-commit hook configuration so please ensure you install it into your local working copy via + +``` +pre-commit install +pre-commit install-hooks +```