Allow contributors to run linting easily on local

Signed-off-by: Marco Franssen <[email protected]>
This commit is contained in:
Marco Franssen
2023-06-17 03:42:41 +02:00
parent e88f7f6fe2
commit 9cf6049afd
3 changed files with 24 additions and 3 deletions
+1 -3
View File
@@ -94,9 +94,7 @@ jobs:
version: ${{ env.CHART_TESTING_VERSION }}
- name: Run chart-testing (lint)
run: |
ct lint --debug ${{ github.base_ref != 'release' && '--check-version-increment=false' || '' }} \
--target-branch ${{ github.base_ref }}
run: TARGET_BRANCH=${{ github.base_ref }} make lint${{ github.base_ref == 'release' && '-release' || '' }}
outputs:
changed: ${{ steps.list-changed.outputs.changed }}
+12
View File
@@ -1,8 +1,20 @@
TARGET_BRANCH ?= main
.PHONY: help
help: ## Display this help.
@$(MAKE) help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
##@ Linting:
.PHONY: lint
lint: ## Lint the charts using chart-testing
@echo Linting charts…
@ct lint --config ct.yaml --target-branch $(TARGET_BRANCH) --check-version-increment=false
lint-release: ## Lint the charts using chart-testing for release
@echo Linting charts…
@ct lint --config ct.yaml --target-branch $(TARGET_BRANCH)
##@ Testing:
+11
View File
@@ -0,0 +1,11 @@
remote: origin
target-branch: main
chart-dirs:
- charts
chart-repos:
- spiffe=https://spiffe.github.io/helm-charts/
- bitnami=https://charts.bitnami.com/bitnami
- ingress-nginx=https://kubernetes.github.io/ingress-nginx
exclude-deprecated: true
debug: true
helm-extra-args: "--timeout 15m"