Code Review
/
oom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "[MULTICLOUD] Update multicloud k8s image to 0.7.0"
[oom.git]
/
kubernetes
/
Makefile
diff --git
a/kubernetes/Makefile
b/kubernetes/Makefile
index
3f41c3c
..
dfad45f
100644
(file)
--- a/
kubernetes/Makefile
+++ b/
kubernetes/Makefile
@@
-19,12
+19,19
@@
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
OUTPUT_DIR := $(ROOT_DIR)/dist
PACKAGE_DIR := $(OUTPUT_DIR)/packages
SECRET_DIR := $(OUTPUT_DIR)/secrets
OUTPUT_DIR := $(ROOT_DIR)/dist
PACKAGE_DIR := $(OUTPUT_DIR)/packages
SECRET_DIR := $(OUTPUT_DIR)/secrets
+HELM_VER := $(shell helm version --template "{{.Version}}")
+
+ifneq ($(SKIP_LINT),TRUE)
+ HELM_LINT_CMD := helm lint
+else
+ HELM_LINT_CMD := echo "Skipping linting of"
+endif
SUBMODS := robot aai
EXCLUDES := config oneclick readiness test dist helm $(PARENT_CHART) dcae $(SUBMODS)
SUBMODS := robot aai
EXCLUDES := config oneclick readiness test dist helm $(PARENT_CHART) dcae $(SUBMODS)
-HELM_CHARTS := $(filter-out $(EXCLUDES), $(
patsubst %/.,%,$(wildcard */.
))) $(PARENT_CHART)
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(
sort $(patsubst %/.,%,$(wildcard */.)
))) $(PARENT_CHART)
-.PHONY: $(EXCLUDES) $(HELM_CHARTS)
$(SUBMODS)
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
all: $(COMMON_CHARTS_DIR) $(SUBMODS) $(HELM_CHARTS) plugins
all: $(COMMON_CHARTS_DIR) $(SUBMODS) $(HELM_CHARTS) plugins
@@
-55,11
+62,16
@@
dep-%: make-%
@if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
lint-%: dep-%
@if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
lint-%: dep-%
- @if [ -f $*/Chart.yaml ]; then
helm lint
$*; fi
+ @if [ -f $*/Chart.yaml ]; then
$(HELM_LINT_CMD)
$*; fi
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:
@@
-75,6
+87,7
@@
plugins:
repo:
@mkdir -p $(PACKAGE_DIR)
@helm serve --repo-path $(PACKAGE_DIR) &
repo:
@mkdir -p $(PACKAGE_DIR)
@helm serve --repo-path $(PACKAGE_DIR) &
+ @sleep 3
@helm repo index $(PACKAGE_DIR)
@helm repo add local http://127.0.0.1:8879
@helm repo index $(PACKAGE_DIR)
@helm repo add local http://127.0.0.1:8879