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