This repository has been archived by the owner on Dec 3, 2024. It is now read-only.
forked from jenkins-x/jenkins-x-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (53 loc) · 2.11 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
CHART_REPO := http://jenkins-x-chartmuseum:8080
NAME := jenkins-x
OS := $(shell uname)
RELEASE_VERSION := $(shell jx-release-version)
HELM := helm
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 jx http://chartmuseum.jenkins-x.io
$(HELM) repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com
$(HELM) repo add stable https://kubernetes-charts.storage.googleapis.com
$(HELM) repo add monocular https://helm.github.io/monocular
build: setup clean
$(HELM) dependency build jenkins-x-platform
$(HELM) lint jenkins-x-platform
lint:
$(HELM) dependency build jenkins-x-platform
$(HELM) lint jenkins-x-platform
install: clean setup build
$(HELM) upgrade --debug --install $(NAME) jenkins-x-platform
apply: build
cd jenkins-x-platform
jx step helm apply $(NAME) .
upgrade: clean setup build
$(HELM) upgrade --debug --install $(NAME) jenkins-x-platform
delete:
$(HELM) delete --purge $(NAME)
clean:
rm -rf jenkins-x-platform/charts
rm -rf jenkins-x-platform/${NAME}*.tgz
rm -rf jenkins-x-platform/requirements.lock
release: setup clean build
ifeq ($(OS),Darwin)
sed -i "" -e "s/version:.*/version: $(RELEASE_VERSION)/" jenkins-x-platform/Chart.yaml
else ifeq ($(OS),Linux)
sed -i -e "s/version:.*/version: $(RELEASE_VERSION)/" jenkins-x-platform/Chart.yaml
else
exit -1
endif
git add jenkins-x-platform/Chart.yaml
git commit -a -m "release $(RELEASE_VERSION)" --allow-empty
git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)"
git push origin v$(RELEASE_VERSION)
$(HELM) package jenkins-x-platform
curl --fail -u $(CHARTMUSEUM_CREDS_USR):$(CHARTMUSEUM_CREDS_PSW) --data-binary "@$(NAME)-platform-$(RELEASE_VERSION).tgz" $(CHART_REPO)/api/charts
helm repo update
rm -rf ${NAME}*.tgz
updatebot push-version --kind make CHART_VERSION $(RELEASE_VERSION)
updatebot push-regex -r "JX_PLATFORM_VERSION=(.*)" -v $(RELEASE_VERSION) build.sh
jx step create version pr -f "jenkins-x/*" -b --images
echo $(RELEASE_VERSION) > VERSION