From fc2f37e1f5998e40b34db8535a9bf2a6c7d0034f Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Mon, 28 Sep 2020 16:41:22 +0200 Subject: [PLATFORM] Use helm-push plugin Signed-off-by: Jakub Latusek Issue-ID: OOM-2562 Change-Id: Ic115d723be9ce6a963ddef8c401eeacc6a38698e --- kubernetes/platform/components/Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'kubernetes/platform/components/Makefile') diff --git a/kubernetes/platform/components/Makefile b/kubernetes/platform/components/Makefile index 27e17db9ff..cf69fa68be 100644 --- a/kubernetes/platform/components/Makefile +++ b/kubernetes/platform/components/Makefile @@ -20,6 +20,7 @@ SECRET_DIR := $(OUTPUT_DIR)/secrets EXCLUDES := HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.)))) +HELM_VER := $(shell helm version --template "{{.Version}}") .PHONY: $(EXCLUDES) $(HELM_CHARTS) @@ -40,7 +41,11 @@ lint-%: dep-% package-%: lint-% @mkdir -p $(PACKAGE_DIR) +ifeq "$(findstring v3,$(HELM_VER))" "v3" + @if [ -f $*/Chart.yaml ]; then PACKAGE_NAME=$$(helm package -d $(PACKAGE_DIR) $* | cut -d":" -f2) && helm push -f $$PACKAGE_NAME local; fi +else @if [ -f $*/Chart.yaml ]; then helm package -d $(PACKAGE_DIR) $*; fi +endif @helm repo index $(PACKAGE_DIR) clean: -- cgit 1.2.3-korg