forked from camunda/camunda-platform-helm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
98 lines (79 loc) · 2.92 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Makefile for managing the helm charts
chartPath=charts/camunda-platform
releaseName=camunda-platform-test
# test: runs the tests without updating the golden files (runs checks against golden files)
.PHONY: test
test: deps
go test ./...
# it: runs the integration tests against the current kube context
.PHONY: it
it: deps
go test -p 1 -timeout 1h -tags integration ./.../integration
# it-os: runs a subset of the integration tests against the current Openshift cluster
.PHONY: it-os
it-os: deps
go test -p 1 -timeout 1h -tags integration,openshift ./.../integration
# golden: runs the tests with updating the golden files
.PHONY: golden
golden: deps
go test ./... -args -update-golden
# fmt: runs the gofmt in order to format all go files
.PHONY: fmt
fmt:
go fmt ./...
# addlicense: add license headers to go files
.PHONY: addlicense
addlicense:
addlicense -c 'Camunda Services GmbH' -l apache charts/camunda-platform/test/**/*.go
# checkLicense: checks that the go files contain license header
.PHONY: checkLicense
checkLicense:
addlicense -check -l apache charts/camunda-platform/test/**/*.go
# installLicense: installs the addlicense tool
.PHONY: installLicense
installLicense:
go install github.com/google/[email protected]
#########################################################
######### HELM
#########################################################
# deps: updates and downloads the dependencies for the helm chart
.PHONY: deps
deps:
helm dependency update $(chartPath)
helm dependency update $(chartPath)/charts/identity
# install: install the local chart into the current kubernetes cluster/namespace
.PHONY: install
install: deps
helm install $(releaseName) $(chartPath)
# uninstall: uninstalls the chart and removes all related pvc's
.PHONY: uninstall
uninstall:
-helm uninstall $(releaseName)
-kubectl delete pvc -l app.kubernetes.io/instance=$(releaseName)
-kubectl delete pvc -l release=$(releaseName)
# dry-run: runs an install dry-run with the local chart
.PHONY: dry-run
dry-run: deps
helm install $(releaseName) $(chartPath) --dry-run
# template: show all rendered templates for the local chart
.PHONY: template
template: deps
helm template $(releaseName) $(chartPath)
#########################################################
######### Testing
#########################################################
.PHONY: topology
topology:
kubectl exec svc/$(releaseName)-zeebe-gateway -- zbctl --insecure status
#########################################################
######### Release
#########################################################
.PHONY: .bump-chart-version
.bump-chart-version:
@bash scripts/bump-chart-version.sh
.PHONY: bump-chart-version-and-commit
bump-chart-version-and-commit: .bump-chart-version
chart_path="charts/camunda-platform";\
chart_version=`grep -Po '(?<=^version: ).+' $${chart_path}/Chart.yaml`;\
git add $${chart_path};\
git commit -m "chore: bump camunda-platform chart version to $${chart_version}"