diff options
author | Jakub Latusek <j.latusek@samsung.com> | 2020-09-24 19:07:10 +0200 |
---|---|---|
committer | Jakub Latusek <j.latusek@samsung.com> | 2020-09-25 09:47:35 +0200 |
commit | 30801003a990bedda36b4f8aecd8ccc55eca5995 (patch) | |
tree | fe94fc94883235f733e1f80f35dedbe05fc8c579 /kubernetes/sdc/Makefile | |
parent | 7d54df7a616bfb92045e63b75600f6924851292a (diff) |
[SDC] Use helm-push plugin
Signed-off-by: Jakub Latusek <j.latusek@samsung.com>
Issue-ID: OOM-2562
Change-Id: Ib39a3846020292cc4087947356d9d8e6247905d7
Diffstat (limited to 'kubernetes/sdc/Makefile')
-rw-r--r-- | kubernetes/sdc/Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kubernetes/sdc/Makefile b/kubernetes/sdc/Makefile index f2670c552d..3dab31fad0 100644 --- a/kubernetes/sdc/Makefile +++ b/kubernetes/sdc/Makefile @@ -20,6 +20,8 @@ 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) all: $(HELM_CHARTS) @@ -39,7 +41,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: |