forked from TencentCloud/kubernetes-csi-tencentcloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (53 loc) · 2.9 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
65
66
67
68
69
70
71
72
.PHONY: all
# image registry
REGISTRY?=ccr.ccs.tencentyun.com/tkeimages
# cbs image tag
CBS_BASE?=base
CBS_VERSION?=cbs
CBS_ARCH?=linux/amd64,linux/arm64
# cfs image tag
CFS_BASE?=base
CFS_VERSION?=cfs
CFS_MULTI_VERSION?=cfs-multi
# cos image tag
COS_VERSION?=cos
COS_MULTI_VERSION?=cos-multi
# cos-launcher image tag
COS_LAUNCHER_BASE?=base
COS_LAUNCHER_VERSION?=cos-launcher
COS_LAUNCHER_MULTI_VERSION?=cos-launcher-multi
# chdfs image tag
CHDFS_VERSION?=chdfs
# cfsturbo image tag
CFSTURBO_VERSION?=cfsturbo
all: cbs cfs cos cfsturbo chdfs
cbs:
sed -i "s/v1.0.0/${CBS_VERSION}/g" driver/cbs/driver.go
docker buildx build --platform ${CBS_ARCH} . -f build/cbs/Dockerfile -t ${REGISTRY}/csi-tencentcloud-cbs:${CBS_VERSION} --push
cbs-base:
docker buildx build --platform ${CBS_ARCH} . -f build/cbs/base/Dockerfile -t ${REGISTRY}/csi-tencentcloud-cbs:${CBS_BASE} --push
cfs:
sed -i "s/v1.0.0/${CFS_VERSION}/g" driver/cfs/driver.go
docker build . --build-arg TARGETARCH=amd64 -f build/cfs/Dockerfile -t ${REGISTRY}/csi-tencentcloud-cfs:${CFS_VERSION}
docker push ${REGISTRY}/csi-tencentcloud-cfs:${CFS_VERSION}
sed -i "s/${CFS_VERSION}/${CFS_MULTI_VERSION}/g" driver/cfs/driver.go
docker buildx build --platform linux/amd64,linux/arm64 . -f build/cfs/Dockerfile -t ${REGISTRY}/csi-tencentcloud-cfs:${CFS_MULTI_VERSION} --push
cfs-base:
docker buildx build --platform linux/amd64,linux/arm64 . -f build/cfs/base/Dockerfile -t ${REGISTRY}/csi-tencentcloud-cfs:${CFS_BASE} --push
cos: cos-launcher
sed -i "s/v1.0.0/${COS_VERSION}/g" driver/cosfs/driver.go
docker build . --build-arg TARGETARCH=amd64 -f build/cosfs/cosfs/Dockerfile -t ${REGISTRY}/csi-tencentcloud-cos:${COS_VERSION}
docker push ${REGISTRY}/csi-tencentcloud-cos:${COS_VERSION}
sed -i "s/${COS_VERSION}/${COS_MULTI_VERSION}/g" driver/cosfs/driver.go
docker buildx build --platform linux/amd64,linux/arm64 . -f build/cosfs/cosfs/Dockerfile -t ${REGISTRY}/csi-tencentcloud-cos:${COS_MULTI_VERSION} --push
cos-launcher:
docker build . --build-arg TARGETARCH=amd64 -f build/cosfs/launcher/Dockerfile -t ${REGISTRY}/csi-tencentcloud-cos-launcher:${COS_LAUNCHER_VERSION}
docker push ${REGISTRY}/csi-tencentcloud-cos-launcher:${COS_LAUNCHER_VERSION}
docker buildx build --platform linux/amd64,linux/arm64 . -f build/cosfs/launcher/Dockerfile -t ${REGISTRY}/csi-tencentcloud-cos-launcher:${COS_LAUNCHER_MULTI_VERSION} --push
cos-launcher-base:
docker buildx build --platform linux/amd64,linux/arm64 . -f build/cosfs/launcher/base/Dockerfile -t ${REGISTRY}/csi-tencentcloud-cos-launcher:${COS_LAUNCHER_BASE} --push
chdfs:
docker buildx build --platform linux/amd64,linux/arm64 . -f build/chdfs/Dockerfile -t ${REGISTRY}/csi-tencentcloud-chdfs:${CHDFS_VERSION} --push
cfsturbo:
docker build . --build-arg TARGETARCH=amd64 -f build/cfsturbo/Dockerfile -t ${REGISTRY}/csi-tencentcloud-cfsturbo:${CFSTURBO_VERSION}
docker push ${REGISTRY}/csi-tencentcloud-cfsturbo:${CFSTURBO_VERSION}