summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-10-13 07:21:01 +0000
committerGerrit Code Review <gerrit@onap.org>2020-10-13 07:21:01 +0000
commitff8b6b2bb574ed7948dd48860ff7396572426d36 (patch)
tree695fa7c844297727819321120c88fdf62722cb40
parentfe9298f48b7202c60b02fbb54161c5299d637ae7 (diff)
parent6a74e0d730e54ac285a8718a587e86a2f3447a10 (diff)
Merge "Use helm push plugin"
-rw-r--r--kubernetes/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/kubernetes/Makefile b/kubernetes/Makefile
index b25381fd81..dfad45ff24 100644
--- a/kubernetes/Makefile
+++ b/kubernetes/Makefile
@@ -19,6 +19,7 @@ ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
OUTPUT_DIR := $(ROOT_DIR)/dist
PACKAGE_DIR := $(OUTPUT_DIR)/packages
SECRET_DIR := $(OUTPUT_DIR)/secrets
+HELM_VER := $(shell helm version --template "{{.Version}}")
ifneq ($(SKIP_LINT),TRUE)
HELM_LINT_CMD := helm lint
@@ -65,7 +66,12 @@ 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: