[OOF] Use helm-push plugin
Change-Id: I182d3c77a5be3cf220151a0984d44bfe4f25d039
Signed-off-by: Jakub Latusek <j.latusek@samsung.com>
Issue-ID: OOM-2562
diff --git a/kubernetes/oof/components/Makefile b/kubernetes/oof/components/Makefile
index 2fc0cbe..0237136 100755
--- a/kubernetes/oof/components/Makefile
+++ b/kubernetes/oof/components/Makefile
@@ -19,6 +19,7 @@
EXCLUDES :=
HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+HELM_VER := $(shell helm version --template "{{.Version}}")
.PHONY: $(EXCLUDES) $(HELM_CHARTS)
@@ -39,7 +40,11 @@
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: