-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (32 loc) · 1.44 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
REPO=harbor.liebi.com/commission
BUILD_VERSION := $(shell git log -1 --pretty='%h')
NAMESPACE := commission
# 在不同的目录下 project.yaml 配置不同
IMAGE=${REPO}/commission-subql:${BUILD_VERSION}
IMAGE-K=${REPO}/kusama-commission-subql:${BUILD_VERSION}
IMAGE-P=${REPO}/polkadot-commission-subql:${BUILD_VERSION}
build-test:
docker build -f Dockerfile -t ${IMAGE} .
docker push ${IMAGE}
build-kusama:
docker build -f Dockerfile -t ${IMAGE-K} .
docker push ${IMAGE-K}
build-polkadot:
docker build -f Dockerfile -t ${IMAGE-P} .
docker push ${IMAGE-P}
deploy-test:
kubectl apply -f deploy/test/subql.yaml
update-test: build-test
kubectl set image deploy -n ${NAMESPACE} commission-subql-test commission-subql-test=${IMAGE}
kubectl rollout restart deploy -n ${NAMESPACE} commission-subql-test
update: build
kubectl set image deploy -n ${NAMESPACE} commission-subql commission-subql=${IMAGE}
kubectl rollout restart deploy -n ${NAMESPACE} commission-subql
update-polkadot: build-polkadot
kubectl set image deploy -n ${NAMESPACE} polkadot-commission-subql polkadot-commission-subql=${IMAGE-P}
kubectl rollout restart deploy -n ${NAMESPACE} polkadot-commission-subql
update-kusama: build-kusama
kubectl set image deploy -n ${NAMESPACE} kusama-commission-subql kusama-commission-subql=${IMAGE-K}
kubectl rollout restart deploy -n ${NAMESPACE} kusama-commission-subql
restart-proc-only:
# kubectl rollout restart deploy -n ${NAMESPACE}