blob: 000be4804882e2f84cc979bb7b3d69b63a6d810f [file] [log] [blame]
Mike Elliottae51de82018-02-16 10:48:59 -05001PARENT_CHART := onap
2COMMON_CHARTS_DIR := common
Mike Elliottae51de82018-02-16 10:48:59 -05003# FIXME OOM-765
4ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
5OUTPUT_DIR := $(ROOT_DIR)/dist
6PACKAGE_DIR := $(OUTPUT_DIR)/packages
7SECRET_DIR := $(OUTPUT_DIR)/secrets
8
Mike Elliott2670b0e2018-03-21 12:18:40 -04009EXCLUDES := $(COMMON_CHARTS_DIR) config oneclick readiness test dist helm $(PARENT_CHART) dcae
Mandeep Khindaa57d8dd2018-03-09 14:29:37 +000010HELM_CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) $(PARENT_CHART)
Mike Elliottae51de82018-02-16 10:48:59 -050011
12.PHONY: $(EXCLUDES) $(HELM_CHARTS)
13
Mike Elliott2670b0e2018-03-21 12:18:40 -040014all: $(COMMON_CHARTS_DIR) $(HELM_CHARTS)
Mandeep Khindaa57d8dd2018-03-09 14:29:37 +000015
16common:
17 @echo "\n[$@]"
18 @make package-$@
19
Mike Elliottae51de82018-02-16 10:48:59 -050020$(HELM_CHARTS):
21 @echo "\n[$@]"
22 @make package-$@
23
24make-%:
25 @if [ -f $*/Makefile ]; then make -C $*; fi
26
27dep-%: make-%
28 @if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
29
30lint-%: dep-%
31 @if [ -f $*/Chart.yaml ]; then helm lint $*; fi
32
33package-%: lint-%
34 @mkdir -p $(PACKAGE_DIR)
35 @if [ -f $*/Chart.yaml ]; then helm package -d $(PACKAGE_DIR) $*; fi
36
37clean:
38 @rm -f */requirements.lock
39 @rm -f *tgz */charts/*tgz
40 @rm -rf $(PACKAGE_DIR)
41%:
42 @: