2017-02-20 10:11:09 -05:00
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
2017-11-27 12:18:58 -05:00
|
|
|
# It's necessary to set this because some environments don't link sh -> bash.
|
|
|
|
SHELL := /bin/bash
|
2020-10-24 20:01:18 -05:00
|
|
|
HELM := helm
|
2018-05-14 00:15:06 -05:00
|
|
|
TASK := build
|
2017-11-27 12:18:58 -05:00
|
|
|
|
2019-02-28 10:51:40 +01:00
|
|
|
EXCLUDES := helm-toolkit doc tests tools logs tmp zuul.d releasenotes
|
2018-05-14 00:15:06 -05:00
|
|
|
CHARTS := helm-toolkit $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.)))
|
2016-11-17 12:40:28 -08:00
|
|
|
|
2017-11-27 12:18:58 -05:00
|
|
|
.PHONY: $(EXCLUDES) $(CHARTS)
|
|
|
|
|
2017-05-04 23:04:01 -05:00
|
|
|
all: $(CHARTS)
|
2016-11-23 13:26:08 -08:00
|
|
|
|
2017-05-04 23:04:01 -05:00
|
|
|
$(CHARTS):
|
2018-05-14 00:15:06 -05:00
|
|
|
@if [ -d $@ ]; then \
|
|
|
|
echo; \
|
|
|
|
echo "===== Processing [$@] chart ====="; \
|
|
|
|
make $(TASK)-$@; \
|
|
|
|
fi
|
2016-11-25 16:27:18 -08:00
|
|
|
|
2017-05-04 23:04:01 -05:00
|
|
|
init-%:
|
|
|
|
if [ -f $*/Makefile ]; then make -C $*; fi
|
2020-10-24 20:01:18 -05:00
|
|
|
if [ -f $*/requirements.yaml ]; then $(HELM) dep up $*; fi
|
2017-04-20 21:53:51 -05:00
|
|
|
|
2017-05-04 23:04:01 -05:00
|
|
|
lint-%: init-%
|
2020-10-24 20:01:18 -05:00
|
|
|
if [ -d $* ]; then $(HELM) lint $*; fi
|
2016-11-25 16:27:18 -08:00
|
|
|
|
2017-05-04 23:04:01 -05:00
|
|
|
build-%: lint-%
|
2020-10-24 20:01:18 -05:00
|
|
|
if [ -d $* ]; then $(HELM) package $*; fi
|
2017-04-24 18:03:35 -05:00
|
|
|
|
2020-12-04 17:33:57 -06:00
|
|
|
# This is used exclusively with helm3 building in the gate to publish
|
|
|
|
package-%: init-%
|
|
|
|
if [ -d $* ]; then helm package $*; fi
|
|
|
|
|
2016-12-23 15:31:10 -05:00
|
|
|
clean:
|
2018-05-14 00:15:06 -05:00
|
|
|
@echo "Clean all build artifacts"
|
|
|
|
rm -f */templates/_partials.tpl */templates/_globals.tpl
|
|
|
|
rm -f *tgz */charts/*tgz */requirements.lock
|
|
|
|
rm -rf */charts */tmpcharts
|
2017-05-01 22:44:22 -05:00
|
|
|
|
2017-10-23 12:23:17 -05:00
|
|
|
pull-all-images:
|
|
|
|
@./tools/pull-images.sh
|
|
|
|
|
2017-11-27 12:18:58 -05:00
|
|
|
pull-images:
|
|
|
|
@./tools/pull-images.sh $(filter-out $@,$(MAKECMDGOALS))
|
2017-09-26 13:00:41 -04:00
|
|
|
|
|
|
|
dev-deploy:
|
|
|
|
@./tools/gate/devel/start.sh $(filter-out $@,$(MAKECMDGOALS))
|
|
|
|
|
|
|
|
%:
|
|
|
|
@:
|