summaryrefslogtreecommitdiffstats
path: root/kubernetes/Makefile
diff options
context:
space:
mode:
authorJakub Latusek <j.latusek@samsung.com>2020-10-12 11:55:56 +0000
committerJakub Latusek <j.latusek@samsung.com>2020-10-12 14:08:08 +0200
commit6a74e0d730e54ac285a8718a587e86a2f3447a10 (patch)
tree24eba529b9df50c530f74c8fbffe6feb003ae281 /kubernetes/Makefile
parent7ba9cb9f6e9dd62210d42eb19e693293bab52042 (diff)
Use helm push plugin
Change-Id: Ic0df69cdf5be0eaef749b784e59daec0c8ffff63 Signed-off-by: Jakub Latusek <j.latusek@samsung.com> Issue-ID: OOM-2562
Diffstat (limited to 'kubernetes/Makefile')
-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: