aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/platform/components/Makefile
diff options
context:
space:
mode:
authorJakub Latusek <j.latusek@samsung.com>2020-09-28 16:41:22 +0200
committerJakub Latusek <j.latusek@samsung.com>2020-09-28 16:43:07 +0200
commitfc2f37e1f5998e40b34db8535a9bf2a6c7d0034f (patch)
treee0491b19bb12857b38aba9eafc4b8973b9ac982f /kubernetes/platform/components/Makefile
parentd61412dfd0ae723829cbac7dafde941e54c804ca (diff)
[PLATFORM] Use helm-push plugin
Signed-off-by: Jakub Latusek <j.latusek@samsung.com> Issue-ID: OOM-2562 Change-Id: Ic115d723be9ce6a963ddef8c401eeacc6a38698e
Diffstat (limited to 'kubernetes/platform/components/Makefile')
-rw-r--r--kubernetes/platform/components/Makefile5
1 files changed, 5 insertions, 0 deletions
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: