charts/.taskfiles/Taskfile_chart.yml
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs c9cdfddee8
[multiple] Migrate to common v3 (#1077)
* [unpackerr] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [uptimerobot-prometheus] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [valheim] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [wallabag] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [whoogle] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [wikijs] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [xbackbone] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [youtubedl-material] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [baikal] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [blocky] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [comcast] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [gollum] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [kanboard] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [jetbrains-projector] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [vikunja] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [leaf2mqtt] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
2021-07-08 08:56:38 -04:00

67 lines
2.1 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_TYPE}}/{{.CHART}}"
- ./.bin/go-replace -s '${CHARTNAME}' -r "{{.CHART}}" --path="{{.GIT_ROOT}}/charts/{{.CHART_TYPE}}/{{.CHART}}" --path-pattern='*.*'
- task: dependency
- echo "Congratulations, charts/{{.CHART_TYPE}}/{{.CHART}} successfully generated, you can now edit chart informations ( Chart.yaml and values.yaml )"
status:
- test -d "{{.GIT_ROOT}}/charts/{{.CHART_TYPE}}/{{.CHART}}"
deps:
- check-chart
silent: true
dependency:
dir: "{{.GIT_ROOT}}/charts/{{.CHART_TYPE}}/{{.CHART}}"
cmds:
- test -d Chart.lock && rm Chart.lock || exit 0
- test -d tmpcharts && rm -rf tmpcharts || exit 0
- helm dependency update
silent: true
dependency-cleanup:
desc: clean up chart dependencies
dir: "{{.GIT_ROOT}}/charts"
cmds:
- find {{.GIT_ROOT}}/charts/ -type f -name 'Chart.lock' -mindepth 1 -print0 | xargs -r -0 rm
- find {{.GIT_ROOT}}/charts/ -type d -name 'charts' -mindepth 1 -print0 | xargs -r -0 rm -rf
silent: true
lint:
desc: lint your chart code
dir: "{{.GIT_ROOT}}/charts/{{.CHART_TYPE}}/{{.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_TYPE}}/{{.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_TYPE}}" "{{.CHART}}"
deps:
- check-chart
# Checks Parameters
check-chart:
cmds:
- test ! -z "{{.CHART_TYPE}}" || (echo "Please define CHART_TYPE parameter"; exit 1)
- test ! -z "{{.CHART}}" || (echo "Please define CHART parameter"; exit 1)
silent: true