summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kubernetes/Makefile27
-rwxr-xr-xkubernetes/helm/plugins/deploy/deploy.sh6
2 files changed, 26 insertions, 7 deletions
diff --git a/kubernetes/Makefile b/kubernetes/Makefile
index fa63bd8942..ee9e8d980b 100644
--- a/kubernetes/Makefile
+++ b/kubernetes/Makefile
@@ -20,12 +20,19 @@ OUTPUT_DIR := $(ROOT_DIR)/dist
PACKAGE_DIR := $(OUTPUT_DIR)/packages
SECRET_DIR := $(OUTPUT_DIR)/secrets
-EXCLUDES := config oneclick readiness test dist helm $(PARENT_CHART) dcae
-HELM_CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) $(PARENT_CHART)
+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)
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.)))) $(PARENT_CHART)
.PHONY: $(EXCLUDES) $(HELM_CHARTS)
-all: $(COMMON_CHARTS_DIR) $(HELM_CHARTS) plugins
+all: $(COMMON_CHARTS_DIR) $(SUBMODS) $(HELM_CHARTS) plugins
$(COMMON_CHARTS):
@echo "\n[$@]"
@@ -35,6 +42,18 @@ $(HELM_CHARTS):
@echo "\n[$@]"
@make package-$@
+$(SUBMODS):
+ @echo "\n[$@]"
+ @make submod-$@
+ @make package-$@
+
+submod-%:
+ @make $*/requirements.yaml
+
+%/requirements.yaml:
+ $(error Submodule $* needs to be retrieved from gerrit. See https://wiki.onap.org/display/DW/OOM+-+Development+workflow+after+code+transfer+to+tech+teams ); fi
+
+
make-%:
@if [ -f $*/Makefile ]; then make -C $*; fi
@@ -42,7 +61,7 @@ dep-%: make-%
@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)
diff --git a/kubernetes/helm/plugins/deploy/deploy.sh b/kubernetes/helm/plugins/deploy/deploy.sh
index 3da189b908..bb98a3b95e 100755
--- a/kubernetes/helm/plugins/deploy/deploy.sh
+++ b/kubernetes/helm/plugins/deploy/deploy.sh
@@ -151,9 +151,6 @@ deploy() {
# clear previously cached charts
rm -rf $CACHE_DIR
- # create log driectory
- mkdir -p $LOG_DIR
-
# fetch umbrella chart (parent chart containing subcharts)
if [[ -d "$CHART_URL" ]]; then
mkdir -p $CHART_DIR
@@ -169,6 +166,9 @@ deploy() {
helm fetch $CHART_URL --untar --untardir $CACHE_DIR $VERSION
fi
+ # create log driectory
+ mkdir -p $LOG_DIR
+
# move out subcharts to process separately
mkdir -p $CACHE_SUBCHART_DIR
mv $CHART_DIR/charts/* $CACHE_SUBCHART_DIR/