|
1 | 1 | steps:
|
2 |
| - - id: docker_buildx |
| 2 | + # - id: docker_buildx |
| 3 | + # name: docker:20.10 |
| 4 | + # args: |
| 5 | + # - build |
| 6 | + # - --target=docker |
| 7 | + # - --build-arg=DOCKER_VERSION=${_DOCKER_VERSION} |
| 8 | + # - --build-arg=BUILDX_VERSION=${_BUILDX_VERSION} |
| 9 | + # - --build-arg=BUILDKIT_VERSION=${_BUILDKIT_VERSION} |
| 10 | + # - --tag=docker-buildx:cloudbuild |
| 11 | + # - --file=hack/dockerfiles/buildx.dockerfile |
| 12 | + # - hack/dockerfiles |
| 13 | + # env: |
| 14 | + # - "DOCKER_BUILDKIT=1" |
| 15 | + # waitFor: |
| 16 | + # - "-" |
| 17 | + # |
| 18 | + # - id: bootstrap_buildx |
| 19 | + # name: docker-buildx:cloudbuild |
| 20 | + # args: |
| 21 | + # - buildx |
| 22 | + # - create |
| 23 | + # - --bootstrap |
| 24 | + # - --name=cloudbuild |
| 25 | + # - --driver=docker-container |
| 26 | + # - --buildkitd-flags='--oci-worker-snapshotter=stargz' |
| 27 | + # - --driver-opt=image=moby/buildkit:v0.9.2 |
| 28 | + # - --driver-opt=network=cloudbuild |
| 29 | + # - --use |
| 30 | + # waitFor: |
| 31 | + # - "docker_buildx" |
| 32 | + |
| 33 | + - id: buildkitd |
3 | 34 | name: docker:20.10
|
4 | 35 | args:
|
5 |
| - - build |
6 |
| - - --target=docker |
7 |
| - - --build-arg=DOCKER_VERSION=${_DOCKER_VERSION} |
8 |
| - - --build-arg=BUILDX_VERSION=${_BUILDX_VERSION} |
9 |
| - - --tag=docker-buildx:cloudbuild |
10 |
| - - --file=hack/dockerfiles/buildx.dockerfile |
11 |
| - - hack/dockerfiles |
12 |
| - env: |
13 |
| - - "DOCKER_BUILDKIT=1" |
| 36 | + - container |
| 37 | + - run |
| 38 | + - --detach |
| 39 | + - --privileged |
| 40 | + - --name=buildkitd |
| 41 | + - --network=cloudbuild |
| 42 | + - moby/buildkit:v0.9.2 |
14 | 43 | waitFor:
|
15 | 44 | - "-"
|
16 | 45 |
|
17 |
| - - id: bootstrap_buildx |
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 |
| - - --use |
28 |
| - waitFor: |
29 |
| - - "docker_buildx" |
30 |
| - |
31 |
| - - id: protoc-builder |
32 |
| - name: docker-buildx:cloudbuild |
33 |
| - args: |
34 |
| - - buildx |
35 |
| - - build |
36 |
| - - --target=protoc-builder |
37 |
| - - --build-arg=BUILDKIT_INLINE_CACHE=1 |
38 |
| - - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
39 |
| - - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
40 |
| - - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
41 |
| - - --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 |
43 |
| - - . |
44 |
| - waitFor: |
45 |
| - - "bootstrap_buildx" |
46 |
| - |
47 |
| - - id: protoc |
48 |
| - name: docker-buildx:cloudbuild |
49 |
| - args: |
50 |
| - - buildx |
51 |
| - - build |
52 |
| - - --target=protoc |
53 |
| - - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
54 |
| - - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
55 |
| - - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
56 |
| - - --tag=gcr.io/$PROJECT_ID/protoc/protoc:${_PROTOC_VERSION} |
57 |
| - - --load |
58 |
| - - . |
59 |
| - waitFor: |
60 |
| - - "protoc-builder" |
61 |
| - |
62 |
| - - id: protoc-debug |
63 |
| - name: docker-buildx:cloudbuild |
| 46 | + - id: buildctl_test |
| 47 | + name: moby/buildkit:v0.9.2 |
| 48 | + entrypoint: "buildctl" |
64 | 49 | args:
|
65 |
| - - buildx |
66 |
| - - build |
67 |
| - - --target=protoc-debug |
68 |
| - - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
69 |
| - - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
70 |
| - - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
71 |
| - - --tag=gcr.io/$PROJECT_ID/protoc/protoc:${_PROTOC_VERSION}-debug |
72 |
| - - --load |
73 |
| - - . |
| 50 | + # - --addr=docker-container://buildx_buildkit_cloudbuild0 |
| 51 | + - --addr=docker-container://buildkitd |
| 52 | + - du |
74 | 53 | waitFor:
|
75 |
| - - "protoc-builder" |
| 54 | + - "buildkitd" |
76 | 55 |
|
77 |
| - - id: golang-builder |
78 |
| - name: docker-buildx:cloudbuild |
79 |
| - args: |
80 |
| - - buildx |
81 |
| - - build |
82 |
| - - --target=golang-builder |
83 |
| - - --build-arg=BUILDKIT_INLINE_CACHE=1 |
84 |
| - - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
85 |
| - - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
86 |
| - - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
87 |
| - - --build-arg=PROTOC_GEN_GO_VERSION=${_PROTOC_GEN_GO_VERSION} |
88 |
| - - --build-arg=PROTOC_GEN_GO_GRPC_VERSION=${_PROTOC_GEN_GO_GRPC_VERSION} |
89 |
| - - --cache-from=type=registry,ref=gcr.io/$PROJECT_ID/protoc/golang-builder:cloudbuild_cache |
90 |
| - - --output=type=image,name=gcr.io/$PROJECT_ID/protoc/golang-builder:cloudbuild_cache,push=true |
91 |
| - - . |
92 |
| - waitFor: |
93 |
| - - "protoc" |
94 |
| - - "protoc-debug" |
95 |
| - |
96 |
| - - id: golang |
97 |
| - name: docker-buildx:cloudbuild |
98 |
| - args: |
99 |
| - - buildx |
100 |
| - - build |
101 |
| - - --target=golang |
102 |
| - - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
103 |
| - - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
104 |
| - - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
105 |
| - - --build-arg=PROTOC_GEN_GO_VERSION=${_PROTOC_GEN_GO_VERSION} |
106 |
| - - --build-arg=PROTOC_GEN_GO_GRPC_VERSION=${_PROTOC_GEN_GO_GRPC_VERSION} |
107 |
| - - --tag=gcr.io/$PROJECT_ID/protoc/golang:${_PROTOC_VERSION}-${_GOLANG_VERSION} |
108 |
| - - --load |
109 |
| - - . |
110 |
| - waitFor: |
111 |
| - - "golang-builder" |
112 |
| - |
113 |
| - - id: golang-debug |
114 |
| - name: docker-buildx:cloudbuild |
115 |
| - args: |
116 |
| - - buildx |
117 |
| - - build |
118 |
| - - --target=golang-debug |
119 |
| - - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
120 |
| - - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
121 |
| - - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
122 |
| - - --build-arg=PROTOC_GEN_GO_VERSION=${_PROTOC_GEN_GO_VERSION} |
123 |
| - - --build-arg=PROTOC_GEN_GO_GRPC_VERSION=${_PROTOC_GEN_GO_GRPC_VERSION} |
124 |
| - - --tag=gcr.io/$PROJECT_ID/protoc/golang:${_PROTOC_VERSION}-${_GOLANG_VERSION}-debug |
125 |
| - - --load |
126 |
| - - . |
127 |
| - waitFor: |
128 |
| - - "golang-builder" |
| 56 | + # - id: protoc-builder |
| 57 | + # name: docker-buildx:cloudbuild |
| 58 | + # args: |
| 59 | + # - buildx |
| 60 | + # - build |
| 61 | + # - --target=protoc-builder |
| 62 | + # - --build-arg=BUILDKIT_INLINE_CACHE=1 |
| 63 | + # - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
| 64 | + # - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
| 65 | + # - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
| 66 | + # - --cache-from=type=registry,ref=gcr.io/$PROJECT_ID/protoc/protoc-builder:cloudbuild_cache |
| 67 | + # - --output=type=image,name=gcr.io/$PROJECT_ID/protoc/protoc-builder:cloudbuild_cache,push=true |
| 68 | + # - . |
| 69 | + # waitFor: |
| 70 | + # - "bootstrap_buildx" |
| 71 | + # |
| 72 | + # - id: protoc |
| 73 | + # name: docker-buildx:cloudbuild |
| 74 | + # args: |
| 75 | + # - buildx |
| 76 | + # - build |
| 77 | + # - --target=protoc |
| 78 | + # - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
| 79 | + # - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
| 80 | + # - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
| 81 | + # - --tag=gcr.io/$PROJECT_ID/protoc/protoc:${_PROTOC_VERSION} |
| 82 | + # - --load |
| 83 | + # - . |
| 84 | + # waitFor: |
| 85 | + # - "protoc-builder" |
| 86 | + # |
| 87 | + # - id: protoc-debug |
| 88 | + # name: docker-buildx:cloudbuild |
| 89 | + # args: |
| 90 | + # - buildx |
| 91 | + # - build |
| 92 | + # - --target=protoc-debug |
| 93 | + # - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
| 94 | + # - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
| 95 | + # - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
| 96 | + # - --tag=gcr.io/$PROJECT_ID/protoc/protoc:${_PROTOC_VERSION}-debug |
| 97 | + # - --load |
| 98 | + # - . |
| 99 | + # waitFor: |
| 100 | + # - "protoc-builder" |
| 101 | + # |
| 102 | + # - id: golang-builder |
| 103 | + # name: docker-buildx:cloudbuild |
| 104 | + # args: |
| 105 | + # - buildx |
| 106 | + # - build |
| 107 | + # - --target=golang-builder |
| 108 | + # - --build-arg=BUILDKIT_INLINE_CACHE=1 |
| 109 | + # - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
| 110 | + # - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
| 111 | + # - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
| 112 | + # - --build-arg=PROTOC_GEN_GO_VERSION=${_PROTOC_GEN_GO_VERSION} |
| 113 | + # - --build-arg=PROTOC_GEN_GO_GRPC_VERSION=${_PROTOC_GEN_GO_GRPC_VERSION} |
| 114 | + # - --cache-from=type=registry,ref=gcr.io/$PROJECT_ID/protoc/golang-builder:cloudbuild_cache |
| 115 | + # - --output=type=image,name=gcr.io/$PROJECT_ID/protoc/golang-builder:cloudbuild_cache,push=true |
| 116 | + # - . |
| 117 | + # waitFor: |
| 118 | + # - "protoc" |
| 119 | + # - "protoc-debug" |
| 120 | + # |
| 121 | + # - id: golang |
| 122 | + # name: docker-buildx:cloudbuild |
| 123 | + # args: |
| 124 | + # - buildx |
| 125 | + # - build |
| 126 | + # - --target=golang |
| 127 | + # - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
| 128 | + # - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
| 129 | + # - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
| 130 | + # - --build-arg=PROTOC_GEN_GO_VERSION=${_PROTOC_GEN_GO_VERSION} |
| 131 | + # - --build-arg=PROTOC_GEN_GO_GRPC_VERSION=${_PROTOC_GEN_GO_GRPC_VERSION} |
| 132 | + # - --tag=gcr.io/$PROJECT_ID/protoc/golang:${_PROTOC_VERSION}-${_GOLANG_VERSION} |
| 133 | + # - --load |
| 134 | + # - . |
| 135 | + # waitFor: |
| 136 | + # - "golang-builder" |
| 137 | + # |
| 138 | + # - id: golang-debug |
| 139 | + # name: docker-buildx:cloudbuild |
| 140 | + # args: |
| 141 | + # - buildx |
| 142 | + # - build |
| 143 | + # - --target=golang-debug |
| 144 | + # - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
| 145 | + # - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
| 146 | + # - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
| 147 | + # - --build-arg=PROTOC_GEN_GO_VERSION=${_PROTOC_GEN_GO_VERSION} |
| 148 | + # - --build-arg=PROTOC_GEN_GO_GRPC_VERSION=${_PROTOC_GEN_GO_GRPC_VERSION} |
| 149 | + # - --tag=gcr.io/$PROJECT_ID/protoc/golang:${_PROTOC_VERSION}-${_GOLANG_VERSION}-debug |
| 150 | + # - --load |
| 151 | + # - . |
| 152 | + # waitFor: |
| 153 | + # - "golang-builder" |
129 | 154 |
|
130 | 155 | substitutions:
|
131 | 156 | _DOCKER_VERSION: "20.10"
|
132 |
| - _BUILDX_VERSION: "0.7.0-rc1" # https://github.com/docker/buildx/releases/tag/v0.7.0-rc1 |
| 157 | + _BUILDX_VERSION: "0.7.0" # https://github.com/docker/buildx/releases/tag/v0.7.0 |
| 158 | + _BUILDKIT_VERSION: "v0.9.2" |
133 | 159 | _PROTOC_VERSION: "3.19.0" # https://github.com/protocolbuffers/protobuf/releases/tag/v3.19.0
|
134 | 160 | _GOLANG_VERSION: "1.17"
|
135 | 161 | _ALPINE_VERSION: "3.14"
|
|
0 commit comments