forked from jenkins-x-charts/vault-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (33 loc) · 1.05 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
CHART_REPO := http://jenkins-x-chartmuseum:8080
NAME := vault-operator
OS := $(shell uname)
CHARTMUSEUM_CREDS_USR := $(shell cat /builder/home/basic-auth-user.json)
CHARTMUSEUM_CREDS_PSW := $(shell cat /builder/home/basic-auth-pass.json)
init:
helm init --client-only
setup: init
helm repo add jenkins-x http://chartmuseum.jenkins-x.io
build: clean setup
helm dependency build ${NAME}
helm lint ${NAME}
install: clean build
helm upgrade ${NAME} ${NAME} --install
upgrade: clean build
helm upgrade ${NAME} ${NAME} --install
delete:
helm delete --purge ${NAME} ${NAME}
clean:
rm -rf ${NAME}/charts
rm -rf ${NAME}/${NAME}*.tgz
rm -rf ${NAME}/requirements.lock
release: clean build
ifeq ($(OS),Darwin)
sed -i "" -e "s/version:.*/version: $(VERSION)/" ${NAME}/Chart.yaml
else ifeq ($(OS),Linux)
sed -i -e "s/version:.*/version: $(VERSION)/" ${NAME}/Chart.yaml
else
exit -1
endif
helm package ${NAME}
curl --fail -u $(CHARTMUSEUM_CREDS_USR):$(CHARTMUSEUM_CREDS_PSW) --data-binary "@$(NAME)-$(VERSION).tgz" $(CHART_REPO)/api/charts
rm -rf ${NAME}*.tgz