forked from jenkins-x-charts/jxboot-helmfile-resources
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (38 loc) · 1.39 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
CHART_REPO := http://jenkins-x-chartmuseum:8080
NAME := jxboot-helmfile-resources
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 jenkinsxio http://chartmuseum.jenkins-x.io
build: setup build-nosetup
build-nosetup: clean
helm dependency build jxboot-helmfile-resources
helm lint jxboot-helmfile-resources
install: clean build
helm upgrade ${NAME} jxboot-helmfile-resources --install
upgrade: clean build
helm upgrade ${NAME} jxboot-helmfile-resources --install
delete:
helm delete --purge ${NAME} jxboot-helmfile-resources
clean:
rm -rf jxboot-helmfile-resources/charts
rm -rf jxboot-helmfile-resources/${NAME}*.tgz
rm -rf jxboot-helmfile-resources/requirements.lock
release: clean build
ifeq ($(OS),Darwin)
sed -i "" -e "s/version:.*/version: $(VERSION)/" jxboot-helmfile-resources/Chart.yaml
else ifeq ($(OS),Linux)
sed -i -e "s/version:.*/version: $(VERSION)/" jxboot-helmfile-resources/Chart.yaml
else
exit -1
endif
helm package jxboot-helmfile-resources
curl --fail -u $(CHARTMUSEUM_CREDS_USR):$(CHARTMUSEUM_CREDS_PSW) --data-binary "@$(NAME)-$(VERSION).tgz" $(CHART_REPO)/api/charts
rm -rf ${NAME}*.tgz
test:
cd tests && go test -v
test-regen:
cd tests && export HELM_UNIT_REGENERATE_EXPECTED=true && go test -v