Skip to content

Commit 8451372

Browse files
Add connect-go v1.5.2 and grpc v1.52.1 plugins (#369)
1 parent d6b6317 commit 8451372

File tree

35 files changed

+262
-0
lines changed

35 files changed

+262
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!Dockerfile
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# syntax=docker/dockerfile:1.4
2+
FROM golang:1.19.6-bullseye AS build
3+
RUN --mount=type=cache,target=/go/pkg/mod \
4+
CGO_ENABLED=0 \
5+
go install -ldflags="-s -w" -trimpath github.com/bufbuild/connect-go/cmd/protoc-gen-connect-go@v1.5.2
6+
7+
FROM scratch
8+
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
9+
COPY --from=build --link /go/bin/protoc-gen-connect-go /
10+
USER nobody
11+
ENTRYPOINT [ "/protoc-gen-connect-go" ]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: v1
2+
name: buf.build/bufbuild/connect-go
3+
plugin_version: v1.5.2
4+
source_url: https://github.com/bufbuild/connect-go
5+
description: Generates client and server stubs for connect-go. Compatible with the gRPC, gRPC-Web, and Connect RPC protocols.
6+
deps:
7+
- plugin: buf.build/protocolbuffers/go:v1.28.1
8+
output_languages:
9+
- go
10+
registry:
11+
go:
12+
min_version: "1.18"
13+
deps:
14+
- module: github.com/bufbuild/connect-go
15+
version: v1.5.2
16+
opts:
17+
- paths=source_relative
18+
spdx_license_id: Apache-2.0
19+
license_url: https://github.com/bufbuild/connect-go/blob/v1.5.2/LICENSE
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!Dockerfile
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# syntax=docker/dockerfile:1.4
2+
FROM debian:bullseye-20230202 AS build
3+
4+
ARG TARGETARCH
5+
6+
RUN apt-get update \
7+
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config g++ unzip zip
8+
RUN arch=${TARGETARCH}; \
9+
if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \
10+
curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/6.0.0/bazel-6.0.0-linux-${arch} \
11+
&& chmod +x /usr/local/bin/bazel
12+
13+
WORKDIR /build
14+
15+
RUN git clone --depth 1 --branch v1.52.1 --recursive https://github.com/grpc/grpc
16+
WORKDIR /build/grpc
17+
RUN bazel build //src/compiler:grpc_plugin_support
18+
RUN bazel build //src/compiler:grpc_cpp_plugin.stripped
19+
20+
FROM gcr.io/distroless/cc-debian11
21+
COPY --from=build --link --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_cpp_plugin .
22+
USER nobody
23+
ENTRYPOINT ["/grpc_cpp_plugin"]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: v1
2+
name: buf.build/grpc/cpp
3+
plugin_version: v1.52.1
4+
source_url: https://github.com/grpc/grpc
5+
description: Generates C++ client and server stubs for the gRPC framework.
6+
deps:
7+
- plugin: buf.build/protocolbuffers/cpp:v21.12
8+
output_languages:
9+
- cpp
10+
spdx_license_id: Apache-2.0
11+
license_url: https://github.com/grpc/grpc/blob/v1.52.1/LICENSE
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!Dockerfile
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# syntax=docker/dockerfile:1.4
2+
FROM debian:bullseye-20230202 AS build
3+
4+
ARG TARGETARCH
5+
6+
RUN apt-get update \
7+
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config g++ unzip zip
8+
RUN arch=${TARGETARCH}; \
9+
if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \
10+
curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/6.0.0/bazel-6.0.0-linux-${arch} \
11+
&& chmod +x /usr/local/bin/bazel
12+
13+
WORKDIR /build
14+
15+
RUN git clone --depth 1 --branch v1.52.1 --recursive https://github.com/grpc/grpc
16+
WORKDIR /build/grpc
17+
RUN bazel build //src/compiler:grpc_plugin_support
18+
RUN bazel build //src/compiler:grpc_csharp_plugin.stripped
19+
20+
FROM gcr.io/distroless/cc-debian11
21+
COPY --from=build --link --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_csharp_plugin .
22+
USER nobody
23+
ENTRYPOINT ["/grpc_csharp_plugin"]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: v1
2+
name: buf.build/grpc/csharp
3+
plugin_version: v1.52.1
4+
source_url: https://github.com/grpc/grpc
5+
description: Generates C# client and server stubs for the gRPC framework.
6+
deps:
7+
- plugin: buf.build/protocolbuffers/csharp:v21.12
8+
output_languages:
9+
- csharp
10+
spdx_license_id: Apache-2.0
11+
license_url: https://github.com/grpc/grpc/blob/v1.52.1/LICENSE
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!Dockerfile

0 commit comments

Comments
 (0)