11steps :
2- - id : docker
2+ - id : docker_buildx
33 name : docker:20.10
44 args :
55 - build
@@ -14,33 +14,47 @@ steps:
1414 waitFor :
1515 - " -"
1616
17+ - id : buildx_create
18+ name : docker-buildx:cloudbuild
19+ args :
20+ - buildx
21+ - create
22+ - --bootstrap
23+ - --name=cloudbuild
24+ - --driver=docker-container
25+ - --driver-opt=image=moby/buildkit:nightly
26+ - --driver-opt=network=cloudbuild
27+ - --buildkitd-flags='--debug'
28+ - --use
29+ waitFor :
30+ - " docker_buildx"
31+
1732 - id : protoc-builder
1833 name : docker-buildx:cloudbuild
1934 args :
2035 - buildx
2136 - build
2237 - --target=protoc-builder
23- - --build-arg=BUILDKIT_INLINE_CACHE=1
2438 - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION}
2539 - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION}
2640 - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION}
27- - --output=type=image,name=gcr.io/$PROJECT_ID/protoc/protoc-builder:cloudbuild_cache,push=true
2841 - --cache-from=type=registry,ref=gcr.io/$PROJECT_ID/protoc/protoc-builder:cloudbuild_cache
42+ - --output=type=image,name=gcr.io/$PROJECT_ID/protoc/protoc-builder:cloudbuild_cache,push=true
2943 - .
3044 waitFor :
31- - " docker "
45+ - " buildx_create "
3246
3347 - id : protoc
3448 name : docker-buildx:cloudbuild
3549 args :
3650 - buildx
3751 - build
3852 - --target=protoc
39- - --build-arg=BUILDKIT_INLINE_CACHE=1
4053 - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION}
4154 - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION}
4255 - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION}
43- - --output=type=image,name=gcr.io/$PROJECT_ID/protoc/protoc:pr${_PR_NUMBER},push=false
56+ - --tag=gcr.io/$PROJECT_ID/protoc/protoc:pr${_PR_NUMBER}
57+ - --load
4458 - .
4559 waitFor :
4660 - " protoc-builder"
@@ -51,11 +65,11 @@ steps:
5165 - buildx
5266 - build
5367 - --target=protoc-debug
54- - --build-arg=BUILDKIT_INLINE_CACHE=1
5568 - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION}
5669 - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION}
5770 - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION}
58- - --output=type=image,name=gcr.io/$PROJECT_ID/protoc/protoc:pr${_PR_NUMBER}-debug,push=false
71+ - --tag=gcr.io/$PROJECT_ID/protoc/protoc:pr${_PR_NUMBER}-debug
72+ - --load
5973 - .
6074 waitFor :
6175 - " protoc-builder"
@@ -66,14 +80,13 @@ steps:
6680 - buildx
6781 - build
6882 - --target=golang-builder
69- - --build-arg=BUILDKIT_INLINE_CACHE=1
7083 - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION}
7184 - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION}
7285 - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION}
7386 - --build-arg=PROTOC_GEN_GO_VERSION=${_PROTOC_GEN_GO_VERSION}
7487 - --build-arg=PROTOC_GEN_GO_GRPC_VERSION=${_PROTOC_GEN_GO_GRPC_VERSION}
75- - --output=type=image,name=gcr.io/$PROJECT_ID/protoc/golang-builder:cloudbuild_cache,push=true
7688 - --cache-from=type=registry,ref=gcr.io/$PROJECT_ID/protoc/golang-builder:cloudbuild_cache
89+ - --output=type=image,name=gcr.io/$PROJECT_ID/protoc/golang-builder:cloudbuild_cache,push=true
7790 - .
7891 waitFor :
7992 - " protoc"
@@ -85,13 +98,13 @@ steps:
8598 - buildx
8699 - build
87100 - --target=golang
88- - --build-arg=BUILDKIT_INLINE_CACHE=1
89101 - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION}
90102 - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION}
91103 - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION}
92104 - --build-arg=PROTOC_GEN_GO_VERSION=${_PROTOC_GEN_GO_VERSION}
93105 - --build-arg=PROTOC_GEN_GO_GRPC_VERSION=${_PROTOC_GEN_GO_GRPC_VERSION}
94106 - --tag=gcr.io/$PROJECT_ID/protoc/golang:pr${_PR_NUMBER}
107+ - --load
95108 - .
96109 waitFor :
97110 - " golang-builder"
@@ -102,13 +115,13 @@ steps:
102115 - buildx
103116 - build
104117 - --target=golang-debug
105- - --build-arg=BUILDKIT_INLINE_CACHE=1
106118 - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION}
107119 - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION}
108120 - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION}
109121 - --build-arg=PROTOC_GEN_GO_VERSION=${_PROTOC_GEN_GO_VERSION}
110122 - --build-arg=PROTOC_GEN_GO_GRPC_VERSION=${_PROTOC_GEN_GO_GRPC_VERSION}
111123 - --tag=gcr.io/$PROJECT_ID/protoc/golang:pr${_PR_NUMBER}-debug
124+ - --load
112125 - .
113126 waitFor :
114127 - " golang-builder"
0 commit comments