feat(common): Release common library 3.7.1 (#383)

Co-authored-by: Aisling McGinn <me@aisling.dev>
This commit is contained in:
Bernd Schorgers 2025-02-11 13:23:27 +01:00 committed by GitHub
parent c94a28baa3
commit 433f6d132b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
146 changed files with 232 additions and 222 deletions

View file

@ -23,10 +23,36 @@ tasks:
- 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
test:
desc: Test chart [CHART=required]
preconditions:
# Requires https://github.com/kstasik/schema-tools
- which helm schematools yq
- test -d "{{.CHART_DIR}}"
- test -d "{{.CHART_TEST_DIR}}"
requires:
vars:
- CHART
vars:
GLOB: "{{.GLOB | default \"**/*_test.yaml\"}}"
CHART_DIR: "{{.PROJECT_DIR}}/charts/{{.CHART}}"
CHART_TYPE:
sh: yq eval '.type // "application"' {{.PROJECT_DIR}}/charts/{{.CHART}}/Chart.yaml
CHART_TEST_DIR: |-
{{.CHART_DIR}}{{- if eq .CHART_TYPE "library" -}}/test-chart{{- end -}}
dir: "{{.CHART_TEST_DIR}}"
cmds:
- cp "{{.CHART_DIR}}/values.schema.json" "{{.CHART_DIR}}/values.schema.bak"
- schematools process dereference "{{.CHART_DIR}}/values.schema.json" --to-file "{{.CHART_DIR}}/values.schema.json"
- defer: mv "{{.CHART_DIR}}/values.schema.bak" "{{.CHART_DIR}}/values.schema.json"
- helm dep update
- helm unittest --color -f "unittests/{{.GLOB}}" .
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
- find {{.PROJECT_DIR}}/charts/ -mindepth 1 -type f -name 'Chart.lock' -print0 | xargs -r -0 rm
- find {{.PROJECT_DIR}}/charts/ -mindepth 1 -type d -name 'charts' -print0 | xargs -r -0 rm -rf
silent: true