Add Makefile option to skip lining of helm charts 44/102144/1
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Fri, 21 Feb 2020 12:50:42 +0000 (13:50 +0100)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Fri, 21 Feb 2020 12:50:42 +0000 (13:50 +0100)
For some reason after introducing our awesome templates to ONAP make
command can take now quite a lot of time, which sometimes causes out
CI jobs to fail.

Command that takes so much time is helm lint.
This patch adds a Makefile option that allows you to skip linting of
helm charts and just build them. Example:

make SKIP_LINT=TRUE

Default behavior stays unchanged.

Issue-ID: OOM-2055
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Change-Id: Ic50bad0cc82892e1daecc5761d6144d788a79d9f

kubernetes/Makefile

index 3f41c3c..7150f10 100644 (file)
@@ -20,6 +20,12 @@ OUTPUT_DIR := $(ROOT_DIR)/dist
 PACKAGE_DIR := $(OUTPUT_DIR)/packages
 SECRET_DIR := $(OUTPUT_DIR)/secrets
 
+ifneq ($(SKIP_LINT),TRUE)
+       HELM_LINT_CMD := helm lint
+else
+       HELM_LINT_CMD := echo "Skipping linting of"
+endif
+
 SUBMODS := robot aai
 EXCLUDES := config oneclick readiness test dist helm $(PARENT_CHART) dcae $(SUBMODS)
 HELM_CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) $(PARENT_CHART)
@@ -55,7 +61,7 @@ dep-%: make-%
        @if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
 
 lint-%: dep-%
-       @if [ -f $*/Chart.yaml ]; then helm lint $*; fi
+       @if [ -f $*/Chart.yaml ]; then $(HELM_LINT_CMD) $*; fi
 
 package-%: lint-%
        @mkdir -p $(PACKAGE_DIR)