charts/.taskfiles/Taskfile_chart.yml
Vegetto a4b0adde3b
[dnsmadeeasy-webhook] New chart (#649)
* add cert-manager-dnsmadeeasy

* fix probes

* Fix for status probes

* Fix deprecation warnings

* update common

* increase path version

* use github repo

* Use helm-docs

* change repo name

* rename

* fix lint issue

* exclude dnsmadeeasy from install check

* Feedback

* splitting ct.yaml

* remove old changelog

Co-authored-by: angelnu <git@angelnucom>
Co-authored-by: ᗪєνιη ᗷυнʟ <onedr0p@users.noreply.github.com>
2021-03-11 19:55:36 -05:00

58 lines
1.6 KiB
YAML

---
version: '3'
tasks:
create:
desc: create new chart
cmds:
- git checkout -b add-chart-{{.CHART}}
- cp -r {{.GIT_ROOT}}/templates/chart {{.GIT_ROOT}}/charts/{{.CHART}}
- ./.bin/go-replace -s '${CHARTNAME}' -r "{{.CHART}}" --path={{.GIT_ROOT}}/charts/{{.CHART}} --path-pattern='*.*'
- task: dependency
- echo "Congratulations, charts/{{.CHART}} successfully generated, you can now edit chart informations ( Chart.yaml and values.yaml )"
status:
- test -d {{.GIT_ROOT}}/charts/{{.CHART}}
deps:
- check-chart
silent: true
dependency:
dir: "{{.GIT_ROOT}}/charts/{{.CHART}}"
cmds:
- test -d Chart.lock && rm Chart.lock || exit 0
- test -d tmpcharts && rm -rf tmpcharts || exit 0
- helm dependency update
silent: true
lint:
desc: lint your chart code
dir: "{{.GIT_ROOT}}/charts/{{.CHART}}"
cmds:
- helm lint
deps:
- dependency
- check-chart
ct-lint:
desc: run `ct lint` on your chart code
cmds:
- docker run --rm -it --user $(id -u):$(id -g) -e "HELM_CONFIG_HOME=/tmp/helm" -e "HELM_CACHE_HOME=/tmp/helm" -v {{.GIT_ROOT}}:/ci -w /ci quay.io/helmpack/chart-testing:latest ct lint --charts charts/{{.CHART}} --config /ci/.github/ct-lint.yaml
deps:
- check-chart
- lint
helm-docs:
desc: generate helm-docs
dir: "{{.GIT_ROOT}}/hack"
cmds:
- ./gen-helm-docs.sh "{{.CHART}}"
deps:
- check-chart
# Checks Parameters
check-chart:
cmds:
- test ! -z "{{.CHART}}" || (echo "Please define CHART parameter"; exit 1)
silent: true