This repository has been archived by the owner on Feb 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 197
/
Makefile
57 lines (47 loc) · 1.89 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
CHART_REPO := http://jenkins-x-chartmuseum:8080
NAME := jenkins-x
OS := $(shell uname)
HELM := helm
init:
$(HELM) init --client-only
setup: init
$(HELM) repo add jx http://chartmuseum.jenkins-x.io
$(HELM) repo add incubator https://charts.helm.sh/incubator
$(HELM) repo add stable https://charts.helm.sh/stable
$(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: $(VERSION)/" jenkins-x-platform/Chart.yaml
else ifeq ($(OS),Linux)
sed -i -e "s/version:.*/version: $(VERSION)/" jenkins-x-platform/Chart.yaml
else
exit -1
endif
$(HELM) package jenkins-x-platform
curl --fail -u $(CHARTMUSEUM_USER):$(CHARTMUSEUM_PASS) --data-binary "@$(NAME)-platform-$(VERSION).tgz" $(CHART_REPO)/api/charts
helm repo add jenkins-x https://storage.googleapis.com/chartmuseum.jenkins-x.io
echo "we have the following remote helm repos:"
helm repo list
helm repo update
rm -rf ${NAME}*.tgz
jx step changelog --verbose --version ${VERSION} --rev ${PULL_BASE_SHA}
jx step create pr make --name CHART_VERSION --version $(VERSION) --repo https://github.com/jenkins-x/cloud-environments.git
jx step create pr regex --regex "JX_PLATFORM_VERSION=(.*)" --version $(VERSION) --files build.sh --repo https://github.com/jenkins-x/cloud-environments.git