|
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 | + - -d |
| 39 | + - --privileged |
| 40 | + - --name=buildkitd |
| 41 | + - moby/buildkit:latest |
14 | 42 | waitFor: |
15 | 43 | - "-" |
16 | 44 |
|
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 |
| 45 | + - id: buildctl_test |
| 46 | + name: moby/buildkit:latest |
| 47 | + # entrypoint: "/usr/bin/buildctl" |
64 | 48 | 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 | | - - . |
| 49 | + # - --addr=docker-container://buildx_buildkit_cloudbuild0 |
| 50 | + - --addr=docker-container://buildkitd |
| 51 | + - du |
74 | 52 | waitFor: |
75 | | - - "protoc-builder" |
| 53 | + - "buildkitd" |
76 | 54 |
|
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" |
| 55 | + # - id: protoc-builder |
| 56 | + # name: docker-buildx:cloudbuild |
| 57 | + # args: |
| 58 | + # - buildx |
| 59 | + # - build |
| 60 | + # - --target=protoc-builder |
| 61 | + # - --build-arg=BUILDKIT_INLINE_CACHE=1 |
| 62 | + # - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
| 63 | + # - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
| 64 | + # - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
| 65 | + # - --cache-from=type=registry,ref=gcr.io/$PROJECT_ID/protoc/protoc-builder:cloudbuild_cache |
| 66 | + # - --output=type=image,name=gcr.io/$PROJECT_ID/protoc/protoc-builder:cloudbuild_cache,push=true |
| 67 | + # - . |
| 68 | + # waitFor: |
| 69 | + # - "bootstrap_buildx" |
| 70 | + # |
| 71 | + # - id: protoc |
| 72 | + # name: docker-buildx:cloudbuild |
| 73 | + # args: |
| 74 | + # - buildx |
| 75 | + # - build |
| 76 | + # - --target=protoc |
| 77 | + # - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
| 78 | + # - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
| 79 | + # - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
| 80 | + # - --tag=gcr.io/$PROJECT_ID/protoc/protoc:${_PROTOC_VERSION} |
| 81 | + # - --load |
| 82 | + # - . |
| 83 | + # waitFor: |
| 84 | + # - "protoc-builder" |
| 85 | + # |
| 86 | + # - id: protoc-debug |
| 87 | + # name: docker-buildx:cloudbuild |
| 88 | + # args: |
| 89 | + # - buildx |
| 90 | + # - build |
| 91 | + # - --target=protoc-debug |
| 92 | + # - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
| 93 | + # - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
| 94 | + # - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
| 95 | + # - --tag=gcr.io/$PROJECT_ID/protoc/protoc:${_PROTOC_VERSION}-debug |
| 96 | + # - --load |
| 97 | + # - . |
| 98 | + # waitFor: |
| 99 | + # - "protoc-builder" |
| 100 | + # |
| 101 | + # - id: golang-builder |
| 102 | + # name: docker-buildx:cloudbuild |
| 103 | + # args: |
| 104 | + # - buildx |
| 105 | + # - build |
| 106 | + # - --target=golang-builder |
| 107 | + # - --build-arg=BUILDKIT_INLINE_CACHE=1 |
| 108 | + # - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
| 109 | + # - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
| 110 | + # - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
| 111 | + # - --build-arg=PROTOC_GEN_GO_VERSION=${_PROTOC_GEN_GO_VERSION} |
| 112 | + # - --build-arg=PROTOC_GEN_GO_GRPC_VERSION=${_PROTOC_GEN_GO_GRPC_VERSION} |
| 113 | + # - --cache-from=type=registry,ref=gcr.io/$PROJECT_ID/protoc/golang-builder:cloudbuild_cache |
| 114 | + # - --output=type=image,name=gcr.io/$PROJECT_ID/protoc/golang-builder:cloudbuild_cache,push=true |
| 115 | + # - . |
| 116 | + # waitFor: |
| 117 | + # - "protoc" |
| 118 | + # - "protoc-debug" |
| 119 | + # |
| 120 | + # - id: golang |
| 121 | + # name: docker-buildx:cloudbuild |
| 122 | + # args: |
| 123 | + # - buildx |
| 124 | + # - build |
| 125 | + # - --target=golang |
| 126 | + # - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
| 127 | + # - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
| 128 | + # - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
| 129 | + # - --build-arg=PROTOC_GEN_GO_VERSION=${_PROTOC_GEN_GO_VERSION} |
| 130 | + # - --build-arg=PROTOC_GEN_GO_GRPC_VERSION=${_PROTOC_GEN_GO_GRPC_VERSION} |
| 131 | + # - --tag=gcr.io/$PROJECT_ID/protoc/golang:${_PROTOC_VERSION}-${_GOLANG_VERSION} |
| 132 | + # - --load |
| 133 | + # - . |
| 134 | + # waitFor: |
| 135 | + # - "golang-builder" |
| 136 | + # |
| 137 | + # - id: golang-debug |
| 138 | + # name: docker-buildx:cloudbuild |
| 139 | + # args: |
| 140 | + # - buildx |
| 141 | + # - build |
| 142 | + # - --target=golang-debug |
| 143 | + # - --build-arg=PROTOC_VERSION=${_PROTOC_VERSION} |
| 144 | + # - --build-arg=GOLANG_VERSION=${_GOLANG_VERSION} |
| 145 | + # - --build-arg=ALPINE_VERSION=${_ALPINE_VERSION} |
| 146 | + # - --build-arg=PROTOC_GEN_GO_VERSION=${_PROTOC_GEN_GO_VERSION} |
| 147 | + # - --build-arg=PROTOC_GEN_GO_GRPC_VERSION=${_PROTOC_GEN_GO_GRPC_VERSION} |
| 148 | + # - --tag=gcr.io/$PROJECT_ID/protoc/golang:${_PROTOC_VERSION}-${_GOLANG_VERSION}-debug |
| 149 | + # - --load |
| 150 | + # - . |
| 151 | + # waitFor: |
| 152 | + # - "golang-builder" |
129 | 153 |
|
130 | 154 | substitutions: |
131 | 155 | _DOCKER_VERSION: "20.10" |
132 | | - _BUILDX_VERSION: "0.7.0-rc1" # https://github.com/docker/buildx/releases/tag/v0.7.0-rc1 |
| 156 | + _BUILDX_VERSION: "0.7.0" # https://github.com/docker/buildx/releases/tag/v0.7.0 |
| 157 | + _BUILDKIT_VERSION: "v0.9.2" |
133 | 158 | _PROTOC_VERSION: "3.19.0" # https://github.com/protocolbuffers/protobuf/releases/tag/v3.19.0 |
134 | 159 | _GOLANG_VERSION: "1.17" |
135 | 160 | _ALPINE_VERSION: "3.14" |
|
0 commit comments