diff options
author | Jakub Latusek <j.latusek@samsung.com> | 2020-10-15 15:02:47 +0200 |
---|---|---|
committer | Jakub Latusek <j.latusek@samsung.com> | 2020-10-16 12:56:40 +0200 |
commit | db52a6ddbb5e1f459d59051de6e54279fd095f06 (patch) | |
tree | 32d30061231aae807a862859367a7766cd2fd10f /kubernetes/common | |
parent | 81b210eaf47b55e40f8cb9ac10ff3d58ce01f8c2 (diff) |
Update makefiles to use specific helm version
Helm is now called by HELM_BIN variable which by default is set to helm
and makefiles use helm from path. HELM_BIN can be overwritten so user
can have two version of helm in system and choose which one to use.
Signed-off-by: Jakub Latusek <j.latusek@samsung.com>
Issue-ID: OOM-2562
Change-Id: I0917796aafe234e87afa0ac3c4c15720296276d5
Diffstat (limited to 'kubernetes/common')
-rw-r--r-- | kubernetes/common/Makefile | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/kubernetes/common/Makefile b/kubernetes/common/Makefile index 0e923b7a75..58125f8506 100644 --- a/kubernetes/common/Makefile +++ b/kubernetes/common/Makefile @@ -20,9 +20,10 @@ SECRET_DIR := $(OUTPUT_DIR)/secrets COMMON_CHARTS_DIR := common EXCLUDES := -HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.)))) -HELM_VER := $(shell helm version --template "{{.Version}}") +HELM_BIN := helm +HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.)))) +HELM_VER := $(shell $(HELM_BIN) version --template "{{.Version}}") .PHONY: $(EXCLUDES) $(HELM_CHARTS) @@ -36,19 +37,19 @@ make-%: @if [ -f $*/Makefile ]; then make -C $*; fi dep-%: make-% - @if [ -f $*/requirements.yaml ]; then helm dep up $*; fi + @if [ -f $*/requirements.yaml ]; then $(HELM_BIN) dep up $*; fi lint-%: dep-% - @if [ -f $*/Chart.yaml ]; then helm lint $*; fi + @if [ -f $*/Chart.yaml ]; then $(HELM_BIN) lint $*; fi 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 + @if [ -f $*/Chart.yaml ]; then PACKAGE_NAME=$$($(HELM_BIN) package -d $(PACKAGE_DIR) $* | cut -d":" -f2) && $(HELM_BIN) push -f $$PACKAGE_NAME local; fi else - @if [ -f $*/Chart.yaml ]; then helm package -d $(PACKAGE_DIR) $*; fi + @if [ -f $*/Chart.yaml ]; then $(HELM_BIN) package -d $(PACKAGE_DIR) $*; fi endif - @helm repo index $(PACKAGE_DIR) + @$(HELM_BIN) repo index $(PACKAGE_DIR) clean: @rm -f */requirements.lock |