forked from camunda-community-hub/zeebe-cluster-helm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (51 loc) · 1.84 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
CHART_REPO := http://jenkins-x-chartmuseum:8080
NAME := zeebe-cluster
OS := $(shell uname)
CHARTMUSEUM_CREDS_USR := $(shell cat /tekton/home/basic-auth-user.json)
CHARTMUSEUM_CREDS_PSW := $(shell cat /tekton/home/basic-auth-pass.json)
init:
helm init --client-only
setup: init
helm repo add jenkins-x http://chartmuseum.jenkins-x.io
helm repo add elastic http://helm.elastic.co
helm repo add releases ${CHART_REPO}
build: clean setup
helm dependency build zeebe-cluster
helm lint zeebe-cluster
install: clean build
helm upgrade ${NAME} zeebe-cluster --install
upgrade: clean build
helm upgrade ${NAME} zeebe-cluster --install
delete:
helm delete --purge ${NAME} zeebe-cluster
clean:
rm -rf zeebe-cluster/charts
rm -rf zeebe-cluster/${NAME}*.tgz
rm -rf zeebe-cluster/requirements.lock
release: clean build
ifeq ($(OS),Darwin)
sed -i "" -e "s/version:.*/version: $(VERSION)/" zeebe-cluster/Chart.yaml
else ifeq ($(OS),Linux)
sed -i -e "s/version:.*/version: $(VERSION)/" zeebe-cluster/Chart.yaml
else
exit -1
endif
helm package zeebe-cluster
curl --fail -u $(CHARTMUSEUM_CREDS_USR):$(CHARTMUSEUM_CREDS_PSW) --data-binary "@$(NAME)-$(VERSION).tgz" $(CHART_REPO)/api/charts
rm -rf ${NAME}*.tgz
tag:
ifeq ($(OS),Darwin)
sed -i "" -e "s/version:.*/version: $(RELEASE_VERSION)/" Chart.yaml
sed -i "" -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else ifeq ($(OS),Linux)
sed -i -e "s/version:.*/version: $(RELEASE_VERSION)/" Chart.yaml
sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
exit -1
endif
git add --all
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed
git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)"
git push origin v$(RELEASE_VERSION)
jx step changelog --verbose --version $(VERSION)