Update Makefile
This patchset updates the Makefile to process all subfolders except an explicitly specified EXCLUDES-list. This would avoid developers adding new charts from needing to modify the Makefile, except for needing it be excluded. Also, this would eases the process of later migrating and integrating charts across OSH, OSH-infra, OSH-addons, etc. Change-Id: I5385f38be1ee4ae6f89fb9d4df6edec97ba8176a Signed-off-by: Tin Lam <tin@irrational.io>
This commit is contained in:
parent
fecac47b5a
commit
f0693773a8
27
Makefile
27
Makefile
@ -12,34 +12,33 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
HELM = helm
|
||||
TASK = build
|
||||
HELM := helm
|
||||
TASK := build
|
||||
|
||||
CHARTS = helm-toolkit ceph mariadb etcd rabbitmq
|
||||
CHARTS += memcached keystone glance cinder horizon neutron nova heat
|
||||
CHARTS += barbican mistral senlin magnum ingress
|
||||
EXCLUDES := helm-toolkit doc tests tools logs
|
||||
CHARTS := helm-toolkit $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.)))
|
||||
|
||||
all: $(CHARTS)
|
||||
|
||||
$(CHARTS):
|
||||
@echo
|
||||
@echo "===== Processing [$@] chart ====="
|
||||
@make $(TASK)-$@
|
||||
|
||||
init-%:
|
||||
@echo
|
||||
@echo "===== Initializing $*"
|
||||
if [ -f $*/Makefile ]; then make -C $*; fi
|
||||
if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
|
||||
|
||||
lint-%: init-%
|
||||
$(HELM) lint $*
|
||||
if [ -d $* ]; then $(HELM) lint $*; fi
|
||||
|
||||
build-%: lint-%
|
||||
$(HELM) package $*
|
||||
if [ -d $* ]; then $(HELM) package $*; fi
|
||||
|
||||
clean:
|
||||
@echo "Removed all .b64, _partials.tpl, and _globals.tpl files"
|
||||
$(shell rm -rf helm-toolkit/secrets/*.b64)
|
||||
$(shell rm -rf */templates/_partials.tpl)
|
||||
$(shell rm -rf */templates/_globals.tpl)
|
||||
@echo "Removed .b64, _partials.tpl, and _globals.tpl files"
|
||||
rm -rf helm-toolkit/secrets/*.b64
|
||||
rm -rf */templates/_partials.tpl
|
||||
rm -rf */templates/_globals.tpl
|
||||
|
||||
.PHONY: $(CHARTS)
|
||||
.PHONY: $(EXCLUDES) $(CHARTS)
|
||||
|
Loading…
Reference in New Issue
Block a user