Skip to content

Commit f5869f9

Browse files
committed
create Makefile
Signed-off-by: TheRealNoob <mike1118@live.com>
1 parent f1fedad commit f5869f9

3 files changed

Lines changed: 22 additions & 3 deletions

File tree

.github/linters/ct.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# See https://github.com/helm/chart-testing#configuration
22
additional-commands:
33
- sh -ec "if [ -f '{{ .Path }}/ci/lint.sh' ]; then shellcheck '{{ .Path }}/ci/lint.sh'; bash '{{ .Path }}/ci/lint.sh'; fi"
4-
- helm unittest --strict --file 'unittests/**/*.yaml' {{ .Path }}
4+
- helm unittest --strict --file 'tests/**/*.yaml' {{ .Path }}
55
chart-dirs:
66
- charts
77
chart-repos:

CONTRIBUTING.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,20 @@ Charts should start at `1.0.0`. Any breaking (backwards incompatible) changes to
5555

5656
### Generate README
5757

58-
The readme of each chart can be re-generated with the following command (run inside the chart directory):
58+
Some (not all) charts make use of [helm-docs](https://github.com/jnorwood/helm-docs) which is a tool for programatically generating the `README.md` file. If the chart you are modifying contains a `README.md.gotmpl` file, then you do not want to modify the `README.md` file directly, but via this template file. Additionally, this template bundles in the default values from `values.yaml` so if you modified either of these files, you'll want to run the following command from the repository root to re-create the `README.md` file.
59+
60+
From the repository root:
61+
62+
```shell
63+
make helm-docs
64+
```
65+
66+
### Unit Tests
67+
68+
Charts can include [helm-unittest](https://github.com/helm-unittest/helm-unittest) tests under a `tests/` directory. To run all chart unit tests from the repository root:
5969

6070
```shell
61-
docker run --rm --volume "$(pwd):/helm-docs" -u "$(id -u)" jnorwood/helm-docs:v1.14.2
71+
make helm-unittest
6272
```
6373

6474
### Community Requirements

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
2+
3+
.PHONY: helm-unittest
4+
helm-unittest:
5+
docker run --rm -v $(MAKEFILE_DIR):/apps helmunittest/helm-unittest:3.19.0-1.0.3 --strict --file 'tests/**/*.yaml' charts/*
6+
7+
.PHONY: helm-docs
8+
helm-docs:
9+
docker run --rm -v $(MAKEFILE_DIR):/helm-docs -u $(shell id -u) jnorwood/helm-docs:v1.14.2 --chart-search-root=charts

0 commit comments

Comments
 (0)