summaryrefslogtreecommitdiffstats
path: root/kubernetes/platform/components/Makefile
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-09-30 11:54:44 +0000
committerGerrit Code Review <gerrit@onap.org>2020-09-30 11:54:44 +0000
commit94074317d16a6ef9249855612abbf5beb2fed00c (patch)
treeacfeb51fb75e0522c6523e0d006abf7eb6b31be7 /kubernetes/platform/components/Makefile
parentf8dc9be8fef02358deb99b1a3cc55a7eecd3b103 (diff)
parentfc2f37e1f5998e40b34db8535a9bf2a6c7d0034f (diff)
Merge "[PLATFORM] Use helm-push plugin"
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: