From 238ac553d75e264c505a84b4e1a553ad94fdb091 Mon Sep 17 00:00:00 2001 From: tschneid Date: Mon, 23 Dec 2024 12:39:59 -0600 Subject: [PATCH] add local helm chart linting --- Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Makefile b/Makefile index 9000a8c4b..e24909259 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,19 @@ fmt: $(GOIMPORTS) $(GOIMPORTS) -w -local github.com/Azure/ARO-HCP $(shell go list -f '{{.Dir}}' -m | xargs) .PHONY: fmt +ct-lint: + # Find all parent directories of directories containing 'Chart.yaml', output via csv without the leading './' + CHART_DIRS=$(shell find . -type f -name 'Chart.yaml' -printf '%h\n' |sed 's|^\./||' | xargs -I {} dirname {} | sort -u | tr '\n' ',' | sed 's/,$$//') && \ + docker run --rm \ + -v $(PWD)/:/src/:z \ + -w /src/ \ + quay.io/helmpack/chart-testing:v3.11.0 ct lint \ + --chart-dirs="$${CHART_DIRS}" \ + --all \ + --validate-maintainers=false; \ + find . -type f -name 'Chart.lock' | xargs -I {} rm {}; \ + find . -type f -name '*.tgz' | xargs -I {} rm {} + # # Infra #