From 2ca93f7f6714013e0668c093e64fce479d040c9a Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Tue, 25 Feb 2020 21:14:21 -0300 Subject: [PATCH] Add script to check helm chart (#5172) --- Makefile | 6 +++--- build/static-check.sh => hack/verify-chart-lint.sh | 10 ++++------ 2 files changed, 7 insertions(+), 9 deletions(-) rename build/static-check.sh => hack/verify-chart-lint.sh (79%) diff --git a/Makefile b/Makefile index 60bd000f3..d05a36861 100644 --- a/Makefile +++ b/Makefile @@ -157,12 +157,12 @@ clean: ## Remove .gocache directory. rm -rf bin/ .gocache/ .cache/ .PHONY: static-check -static-check: ## Run verification script for boilerplate, codegen, gofmt, golint and lualint. +static-check: ## Run verification script for boilerplate, codegen, gofmt, golint, lualint and chart-lint. ifeq ($(USE_DOCKER), true) @build/run-in-docker.sh \ - build/static-check.sh + hack/verify-all.sh else - @build/static-check.sh + @hack/verify-all.sh endif .PHONY: test diff --git a/build/static-check.sh b/hack/verify-chart-lint.sh similarity index 79% rename from build/static-check.sh rename to hack/verify-chart-lint.sh index afadcbf77..75879e517 100755 --- a/build/static-check.sh +++ b/hack/verify-chart-lint.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2018 The Kubernetes Authors. +# Copyright 2020 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,12 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -if [ -n "$DEBUG" ]; then - set -x -fi - set -o errexit set -o nounset set -o pipefail -hack/verify-all.sh +KUBE_ROOT="$( cd "$(dirname "$0")../" >/dev/null 2>&1 ; pwd -P )" + +ct lint --charts ${KUBE_ROOT}/charts/ingress-nginx