diff options
author | Sylvain Desbureaux <sylvain.desbureaux@orange.com> | 2020-09-30 11:54:44 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-09-30 11:54:44 +0000 |
commit | 94074317d16a6ef9249855612abbf5beb2fed00c (patch) | |
tree | acfeb51fb75e0522c6523e0d006abf7eb6b31be7 /kubernetes | |
parent | f8dc9be8fef02358deb99b1a3cc55a7eecd3b103 (diff) | |
parent | fc2f37e1f5998e40b34db8535a9bf2a6c7d0034f (diff) |
Merge "[PLATFORM] Use helm-push plugin"
Diffstat (limited to 'kubernetes')
-rw-r--r-- | kubernetes/platform/Makefile | 5 | ||||
-rw-r--r-- | kubernetes/platform/components/Makefile | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/kubernetes/platform/Makefile b/kubernetes/platform/Makefile index 7a55c2ed59..d3fa8b70d1 100644 --- a/kubernetes/platform/Makefile +++ b/kubernetes/platform/Makefile @@ -19,6 +19,7 @@ SECRET_DIR := $(OUTPUT_DIR)/secrets EXCLUDES := dist resources templates charts HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.)))) +HELM_VER := $(shell helm version --template "{{.Version}}") .PHONY: $(EXCLUDES) $(HELM_CHARTS) @@ -39,7 +40,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: 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: |