mirror of
https://github.com/TeamPiped/Piped-Kubernetes.git
synced 2024-08-14 23:57:15 +00:00
Linting and go-task.
This commit is contained in:
parent
6aa5551f2d
commit
c6d897bbfa
6 changed files with 144 additions and 0 deletions
32
.taskfiles/charts.yaml
Normal file
32
.taskfiles/charts.yaml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
version: "3"
|
||||
|
||||
vars:
|
||||
CT_IMAGE: quay.io/helmpack/chart-testing:v3.6.0
|
||||
REPO_CONFIG_FILE: .ci/repo-config.yaml
|
||||
CT_CONFIG_FILE: .ci/ct/ct.yaml
|
||||
CHARTS_EXCLUDED_FROM_LINT:
|
||||
sh: yq eval '.excluded-charts-lint | join(",")' {{.REPO_CONFIG_FILE}}
|
||||
CHARTS_EXCLUDED_FROM_INSTALL:
|
||||
sh: yq eval '.excluded-charts-install | join(",")' {{.REPO_CONFIG_FILE}}
|
||||
|
||||
tasks:
|
||||
lint:
|
||||
desc: Run ct-lint on charts
|
||||
cmds:
|
||||
- docker run --rm -it --workdir=/data --volume $(pwd):/data {{.CT_IMAGE}} ct lint --config {{.CT_CONFIG_FILE}} --excluded-charts "{{.CHARTS_EXCLUDED_FROM_LINT}}"
|
||||
silent: true
|
||||
|
||||
lint-all:
|
||||
desc: Run ct-lint on all charts
|
||||
cmds:
|
||||
- docker run --rm -it --workdir=/data --volume $(pwd):/data {{.CT_IMAGE}} ct lint --config {{.CT_CONFIG_FILE}} --all --excluded-charts "{{.CHARTS_EXCLUDED_FROM_LINT}}"
|
||||
silent: true
|
||||
|
||||
dependency-cleanup:
|
||||
desc: clean up chart dependencies
|
||||
dir: "{{.PROJECT_DIR}}/charts"
|
||||
cmds:
|
||||
- find {{.PROJECT_DIR}}/charts/ -type f -name 'Chart.lock' -mindepth 1 -print0 | xargs -r -0 rm
|
||||
- find {{.PROJECT_DIR}}/charts/ -type d -name 'charts' -mindepth 1 -print0 | xargs -r -0 rm -rf
|
||||
silent: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue