summaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
authorJakub Latusek <j.latusek@samsung.com>2020-09-14 16:33:55 +0200
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-09-16 07:06:08 +0000
commit6d0bb2a4b3a921991838e062d86ca029831882e0 (patch)
treec0440186ddb1a4e759db364ad5510557c8ea3069 /kubernetes
parent27aae18cdee00c873e3617a6a3b5fb2d294b9b98 (diff)
Use helm-push plugin
Helm3 remove serve command, instead developer suggest to use chartMuseum. In makefile we check helm version and for helm3 we use helm-push plugin to push chart package to local repository Change-Id: I50800c4577140d6dcbd363142efdf625a5ea9e2e Signed-off-by: Jakub Latusek <j.latusek@samsung.com> Issue-ID: OOM-2562
Diffstat (limited to 'kubernetes')
-rw-r--r--kubernetes/common/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/kubernetes/common/Makefile b/kubernetes/common/Makefile
index 941c2f84df..eb782b4fd8 100644
--- a/kubernetes/common/Makefile
+++ b/kubernetes/common/Makefile
@@ -22,6 +22,8 @@ COMMON_CHARTS_DIR := common
EXCLUDES :=
HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+HELM_VER != helm version --template "{{.Version}}"
+
.PHONY: $(EXCLUDES) $(HELM_CHARTS)
all: $(COMMON_CHARTS_DIR) $(HELM_CHARTS)
@@ -41,7 +43,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: