Skip to content

Commit

Permalink
add local helm chart linting
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-schndr committed Dec 23, 2024
1 parent 8c6eacd commit fe80844
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ fmt: $(GOIMPORTS)
$(GOIMPORTS) -w -local github.com/Azure/ARO-HCP $(shell go list -f '{{.Dir}}' -m | xargs)
.PHONY: fmt

helm-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
#
Expand Down

0 comments on commit fe80844

Please sign in to comment.