X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2FMakefile;h=ef913e33a9a9c28b238bc147d443602f76b192e5;hb=7348724b2641bd661e8ce3f678c2f3dc81d88e95;hp=08b028afe14cab95ee05517fe6a06562de3317b1;hpb=103b679fffc112f20cd8a4aa3fb5bc0113890ef1;p=oom.git diff --git a/kubernetes/Makefile b/kubernetes/Makefile index 08b028afe1..ef913e33a9 100644 --- a/kubernetes/Makefile +++ b/kubernetes/Makefile @@ -20,7 +20,14 @@ OUTPUT_DIR := $(ROOT_DIR)/dist PACKAGE_DIR := $(OUTPUT_DIR)/packages SECRET_DIR := $(OUTPUT_DIR)/secrets HELM_BIN := helm -HELM_VER := $(shell $(HELM_BIN) version --template "{{.Version}}") + +# Helm v2 and helm v3 uses different version format so we first try in helm v3 format +# and if it fails then we fallback to helm v2 one +HELM_VER := $(shell $(HELM_BIN) version --template "{{.Version}}" 2>/dev/null) +ifneq "$(findstring v3,$(HELM_VER))" "v3" + HELM_VER := $(shell $(HELM_BIN) version -c --template "{{.Client.SemVer}}") +endif + # use this if you would like to push onap charts to repo with other name # WARNING: Helm v3+ only # WARNING: Make sure to edit also requirements files @@ -32,7 +39,7 @@ else HELM_LINT_CMD := echo "Skipping linting of" endif -SUBMODS := robot aai +SUBMODS := robot EXCLUDES := config oneclick readiness test dist helm $(PARENT_CHART) dcae $(SUBMODS) HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.)))) $(PARENT_CHART) @@ -85,7 +92,7 @@ clean: # publish helm plugins via distrubtion directory plugins: - @cp -R $(HELM_BIN) $(PACKAGE_DIR)/ + @cp -R helm $(PACKAGE_DIR)/ # start up a local helm repo to serve up helm chart packages # WARNING: Only helm < v3 supported