aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/portal
diff options
context:
space:
mode:
authorJakub Latusek <j.latusek@samsung.com>2020-09-28 15:13:43 +0200
committerJakub Latusek <j.latusek@samsung.com>2020-09-28 15:14:44 +0200
commit60051bee86347930c25dbaf73895f025d6af999c (patch)
tree7a071f418290d90608b6ce054dfcde4c8b039ec7 /kubernetes/portal
parentd61412dfd0ae723829cbac7dafde941e54c804ca (diff)
[PORTAL] Use helm-push plugin
Signed-off-by: Jakub Latusek <j.latusek@samsung.com> Issue-ID: OOM-2562 Change-Id: I9f5e99287e21ddec51e26d4c55e4d5db7071adb4
Diffstat (limited to 'kubernetes/portal')
-rw-r--r--kubernetes/portal/Makefile5
-rw-r--r--kubernetes/portal/components/Makefile5
2 files changed, 10 insertions, 0 deletions
diff --git a/kubernetes/portal/Makefile b/kubernetes/portal/Makefile
index 8af301d7ae..248fb056ab 100644
--- a/kubernetes/portal/Makefile
+++ b/kubernetes/portal/Makefile
@@ -19,6 +19,7 @@ SECRET_DIR := $(OUTPUT_DIR)/secrets
EXCLUDES := dist resources templates charts docker
HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+HELM_VER := $(shell helm version --template "{{.Version}}")
.PHONY: $(EXCLUDES) $(HELM_CHARTS)
@@ -39,7 +40,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:
diff --git a/kubernetes/portal/components/Makefile b/kubernetes/portal/components/Makefile
index 2fc0cbe4ab..02371366f6 100644
--- a/kubernetes/portal/components/Makefile
+++ b/kubernetes/portal/components/Makefile
@@ -19,6 +19,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)
@@ -39,7 +40,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: