-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
executable file
·32 lines (29 loc) · 1.01 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# ==================================================================================== #
# QUALITY CONTROL
# ==================================================================================== #
## charttesting: Run Helm chart unit tests
.PHONY: charttesting
charttesting:
@set -e; \
for dir in charts/steadybit-*; do \
echo "Unit Testing $$dir"; \
helm unittest $$dir; \
done
## chartlint: Lint charts
.PHONY: chartlint
chartlint:
ct lint --config chartTesting.yaml
## chart-bump-version: Bump the patch version and optionally set the appVersion
.PHONY: chart-bump-version
chart-bump-version:
@set -e; \
if [ -z "$(CHART)" ]; then\
echo "no chart specified"; \
exit 1; \
fi; \
if [ ! -z "$(APP_VERSION)" ]; then \
yq -i ".appVersion = strenv(APP_VERSION)" charts/$(CHART)/Chart.yaml; \
fi; \
CHART_VERSION=$$(semver -i patch $$(yq '.version' charts/$(CHART)/Chart.yaml)) \
yq -i ".version = strenv(CHART_VERSION)" charts/$(CHART)/Chart.yaml; \
grep -e "^version:" -e "^appVersion:" charts/$(CHART)/Chart.yaml;