Code Review
/
oom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
[SDNC] Use helm-push plugin
[oom.git]
/
kubernetes
/
sdnc
/
components
/
Makefile
diff --git
a/kubernetes/sdnc/components/Makefile
b/kubernetes/sdnc/components/Makefile
index
4e73763
..
c38171c
100644
(file)
--- a/
kubernetes/sdnc/components/Makefile
+++ b/
kubernetes/sdnc/components/Makefile
@@
-20,6
+20,7
@@
SECRET_DIR := $(OUTPUT_DIR)/secrets
EXCLUDES :=
HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
EXCLUDES :=
HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+HELM_VER := $(shell helm version --template "{{.Version}}")
.PHONY: $(EXCLUDES) $(HELM_CHARTS)
.PHONY: $(EXCLUDES) $(HELM_CHARTS)
@@
-40,7
+41,11
@@
lint-%: dep-%
package-%: lint-%
@mkdir -p $(PACKAGE_DIR)
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
@if [ -f $*/Chart.yaml ]; then helm package -d $(PACKAGE_DIR) $*; fi
+endif
@helm repo index $(PACKAGE_DIR)
clean:
@helm repo index $(PACKAGE_DIR)
clean: