Skip to content

Commit

Permalink
Update grpc plugins (#1609)
Browse files Browse the repository at this point in the history
  • Loading branch information
app-token-plugins[bot] authored Dec 2, 2024
1 parent 25dcb3c commit 80a6487
Show file tree
Hide file tree
Showing 36 changed files with 357 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/grpc/cpp/v1.68.1/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
29 changes: 29 additions & 0 deletions plugins/grpc/cpp/v1.68.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# syntax=docker/dockerfile:1.10
FROM debian:bookworm-20241111 AS build

ARG TARGETARCH
ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true"

RUN apt-get update \
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip
RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.24.1/bazelisk-linux-${TARGETARCH} \
&& chmod +x /usr/local/bin/bazelisk \
&& mkdir /build \
&& chown nobody:nogroup /build \
&& usermod --home /build nobody

USER nobody
WORKDIR /build

RUN git clone --depth 1 --branch v1.68.1 https://github.com/grpc/grpc
WORKDIR /build/grpc
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_cpp_plugin.stripped

FROM gcr.io/distroless/cc-debian12:latest@sha256:f913198471738d9eedcd00c0ca812bf663e8959eebff3a3cbadb027ed9da0c38 AS base

FROM scratch
COPY --link --from=base / /
COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_cpp_plugin .
USER nobody
ENTRYPOINT ["/grpc_cpp_plugin"]
13 changes: 13 additions & 0 deletions plugins/grpc/cpp/v1.68.1/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: v1
name: buf.build/grpc/cpp
plugin_version: v1.68.1
source_url: https://github.com/grpc/grpc
description: Generates C++ client and server stubs for the gRPC framework.
deps:
- plugin: buf.build/protocolbuffers/cpp:v29.0
output_languages:
- cpp
spdx_license_id: Apache-2.0
license_url: https://github.com/grpc/grpc/blob/v1.68.1/LICENSE
registry:
cmake: {}
3 changes: 3 additions & 0 deletions plugins/grpc/csharp/v1.68.1/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!Dockerfile
!build.csproj
35 changes: 35 additions & 0 deletions plugins/grpc/csharp/v1.68.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# syntax=docker/dockerfile:1.10
FROM debian:bookworm-20241111 AS build

ARG TARGETARCH
ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true"

RUN apt-get update \
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip
RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.24.1/bazelisk-linux-${TARGETARCH} \
&& chmod +x /usr/local/bin/bazelisk \
&& mkdir /build \
&& chown nobody:nogroup /build \
&& usermod --home /build nobody

USER nobody
WORKDIR /build

RUN git clone --depth 1 --branch v1.68.1 https://github.com/grpc/grpc
WORKDIR /build/grpc
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_csharp_plugin.stripped

FROM mcr.microsoft.com/dotnet/sdk:8.0.404-bookworm-slim@sha256:f91f9181d68b5ed2c8dea199dbbd2f6d172e60bdc43f8a67878b1ad140cf8d6b AS dotnetrestore
WORKDIR /build
COPY --link ./build.csproj /build/build.csproj
RUN mkdir /nuget && dotnet restore --packages /nuget

FROM gcr.io/distroless/cc-debian12:latest@sha256:f913198471738d9eedcd00c0ca812bf663e8959eebff3a3cbadb027ed9da0c38 AS base

FROM scratch
COPY --link --from=base / /
COPY --link --from=dotnetrestore /nuget /nuget
COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_csharp_plugin .
USER nobody
ENTRYPOINT ["/grpc_csharp_plugin"]
20 changes: 20 additions & 0 deletions plugins/grpc/csharp/v1.68.1/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: v1
name: buf.build/grpc/csharp
plugin_version: v1.68.1
source_url: https://github.com/grpc/grpc
description: Generates C# client and server stubs for the gRPC framework.
deps:
- plugin: buf.build/protocolbuffers/csharp:v29.0
output_languages:
- csharp
spdx_license_id: Apache-2.0
license_url: https://github.com/grpc/grpc/blob/v1.68.1/LICENSE
registry:
opts:
- base_namespace=
nuget:
target_frameworks:
- netstandard2.0
deps:
- name: Grpc.Net.Common
version: 2.67.0
9 changes: 9 additions & 0 deletions plugins/grpc/csharp/v1.68.1/build.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Grpc.Net.Common" Version="2.67.0" />
<PackageReference Include="Google.Protobuf" Version="3.29.0" />
</ItemGroup>
</Project>
2 changes: 2 additions & 0 deletions plugins/grpc/java/v1.68.2/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
24 changes: 24 additions & 0 deletions plugins/grpc/java/v1.68.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# syntax=docker/dockerfile:1.10
FROM debian:bookworm-20241111 AS build

ARG TARGETARCH

WORKDIR /build
RUN apt-get update \
&& apt-get install -y curl
RUN arch=${TARGETARCH}; \
if [ "${arch}" = "arm64" ]; then\
arch="aarch_64"; \
elif [ "${arch}" = "amd64" ]; then\
arch="x86_64"; \
fi; \
echo "${arch}"; \
curl -fsSL -o protoc-gen-grpc-java https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/1.68.2/protoc-gen-grpc-java-1.68.2-linux-${arch}.exe

FROM gcr.io/distroless/cc-debian12:latest@sha256:f913198471738d9eedcd00c0ca812bf663e8959eebff3a3cbadb027ed9da0c38 AS base

FROM scratch
COPY --link --from=base / /
COPY --link --from=build --chmod=0755 --chown=root:root /build/protoc-gen-grpc-java .
USER nobody
ENTRYPOINT [ "/protoc-gen-grpc-java" ]
30 changes: 30 additions & 0 deletions plugins/grpc/java/v1.68.2/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: v1
name: buf.build/grpc/java
plugin_version: v1.68.2
source_url: https://github.com/grpc/grpc-java
integration_guide_url: https://grpc.io/docs/languages/java/quickstart
description: Generates Java client and server stubs for the gRPC framework.
deps:
- plugin: buf.build/protocolbuffers/java:v29.0
output_languages:
- java
spdx_license_id: Apache-2.0
license_url: https://github.com/grpc/grpc-java/blob/v1.68.2/LICENSE
registry:
maven:
deps:
- io.grpc:grpc-core:1.68.2
- io.grpc:grpc-protobuf:1.68.2
- io.grpc:grpc-stub:1.68.2
# Add direct dependency on newer protobuf as gRPC is still on 3.25.3
- com.google.protobuf:protobuf-java:4.29.0
additional_runtimes:
- name: lite
deps:
- io.grpc:grpc-core:1.68.2
- io.grpc:grpc-protobuf-lite:1.68.2
- io.grpc:grpc-stub:1.68.2
# Add direct dependency on newer protobuf as gRPC is still on 3.25.3
- com.google.protobuf:protobuf-javalite:4.29.0
- build.buf:protobuf-javalite:4.29.0
opts: [lite]
2 changes: 2 additions & 0 deletions plugins/grpc/objc/v1.68.1/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
29 changes: 29 additions & 0 deletions plugins/grpc/objc/v1.68.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# syntax=docker/dockerfile:1.10
FROM debian:bookworm-20241111 AS build

ARG TARGETARCH
ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true"

RUN apt-get update \
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip
RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.24.1/bazelisk-linux-${TARGETARCH} \
&& chmod +x /usr/local/bin/bazelisk \
&& mkdir /build \
&& chown nobody:nogroup /build \
&& usermod --home /build nobody

USER nobody
WORKDIR /build

RUN git clone --depth 1 --branch v1.68.1 https://github.com/grpc/grpc
WORKDIR /build/grpc
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_objective_c_plugin.stripped

FROM gcr.io/distroless/cc-debian12:latest@sha256:f913198471738d9eedcd00c0ca812bf663e8959eebff3a3cbadb027ed9da0c38 AS base

FROM scratch
COPY --link --from=base / /
COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_objective_c_plugin .
USER nobody
ENTRYPOINT ["/grpc_objective_c_plugin"]
11 changes: 11 additions & 0 deletions plugins/grpc/objc/v1.68.1/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: v1
name: buf.build/grpc/objc
plugin_version: v1.68.1
source_url: https://github.com/grpc/grpc
description: Generates Objective-C client and server stubs for the gRPC framework.
deps:
- plugin: buf.build/protocolbuffers/objc:v29.0
output_languages:
- objective_c
spdx_license_id: Apache-2.0
license_url: https://github.com/grpc/grpc/blob/v1.68.1/LICENSE
2 changes: 2 additions & 0 deletions plugins/grpc/php/v1.68.1/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
29 changes: 29 additions & 0 deletions plugins/grpc/php/v1.68.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# syntax=docker/dockerfile:1.10
FROM debian:bookworm-20241111 AS build

ARG TARGETARCH
ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true"

RUN apt-get update \
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip
RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.24.1/bazelisk-linux-${TARGETARCH} \
&& chmod +x /usr/local/bin/bazelisk \
&& mkdir /build \
&& chown nobody:nogroup /build \
&& usermod --home /build nobody

USER nobody
WORKDIR /build

RUN git clone --depth 1 --branch v1.68.1 https://github.com/grpc/grpc
WORKDIR /build/grpc
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_php_plugin.stripped

FROM gcr.io/distroless/cc-debian12:latest@sha256:f913198471738d9eedcd00c0ca812bf663e8959eebff3a3cbadb027ed9da0c38 AS base

FROM scratch
COPY --link --from=base / /
COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_php_plugin .
USER nobody
ENTRYPOINT ["/grpc_php_plugin"]
11 changes: 11 additions & 0 deletions plugins/grpc/php/v1.68.1/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: v1
name: buf.build/grpc/php
plugin_version: v1.68.1
source_url: https://github.com/grpc/grpc
description: Generates PHP client and server stubs for the gRPC framework.
deps:
- plugin: buf.build/protocolbuffers/php:v29.0
output_languages:
- php
spdx_license_id: Apache-2.0
license_url: https://github.com/grpc/grpc/blob/v1.68.1/LICENSE
2 changes: 2 additions & 0 deletions plugins/grpc/python/v1.68.1/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
29 changes: 29 additions & 0 deletions plugins/grpc/python/v1.68.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# syntax=docker/dockerfile:1.10
FROM debian:bookworm-20241111 AS build

ARG TARGETARCH
ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true"

RUN apt-get update \
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip
RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.24.1/bazelisk-linux-${TARGETARCH} \
&& chmod +x /usr/local/bin/bazelisk \
&& mkdir /build \
&& chown nobody:nogroup /build \
&& usermod --home /build nobody

USER nobody
WORKDIR /build

RUN git clone --depth 1 --branch v1.68.1 https://github.com/grpc/grpc
WORKDIR /build/grpc
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_python_plugin.stripped

FROM gcr.io/distroless/cc-debian12:latest@sha256:f913198471738d9eedcd00c0ca812bf663e8959eebff3a3cbadb027ed9da0c38 AS base

FROM scratch
COPY --link --from=base / /
COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_python_plugin .
USER nobody
ENTRYPOINT ["/grpc_python_plugin"]
19 changes: 19 additions & 0 deletions plugins/grpc/python/v1.68.1/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: v1
name: buf.build/grpc/python
plugin_version: v1.68.1
source_url: https://github.com/grpc/grpc
description: Generates Python client and server stubs for the gRPC framework.
deps:
- plugin: buf.build/protocolbuffers/python:v29.0
output_languages:
- python
spdx_license_id: Apache-2.0
license_url: https://github.com/grpc/grpc/blob/v1.68.1/LICENSE
registry:
python:
package_type: "runtime"
# https://github.com/grpc/grpc/blob/v1.68.1/src/python/grpcio/python_version.py#L19
requires_python: ">=3.8"
deps:
# https://pypi.org/project/grpcio/
- "grpcio"
2 changes: 2 additions & 0 deletions plugins/grpc/ruby/v1.68.1/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
29 changes: 29 additions & 0 deletions plugins/grpc/ruby/v1.68.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# syntax=docker/dockerfile:1.10
FROM debian:bookworm-20241111 AS build

ARG TARGETARCH
ARG BAZEL_OPTS="--host_jvm_args=-Djava.net.preferIPv4Stack=true"

RUN apt-get update \
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip
RUN curl -fsSL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.24.1/bazelisk-linux-${TARGETARCH} \
&& chmod +x /usr/local/bin/bazelisk \
&& mkdir /build \
&& chown nobody:nogroup /build \
&& usermod --home /build nobody

USER nobody
WORKDIR /build

RUN git clone --depth 1 --branch v1.68.1 https://github.com/grpc/grpc
WORKDIR /build/grpc
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_plugin_support
RUN bazelisk ${BAZEL_OPTS} build //src/compiler:grpc_ruby_plugin.stripped

FROM gcr.io/distroless/cc-debian12:latest@sha256:f913198471738d9eedcd00c0ca812bf663e8959eebff3a3cbadb027ed9da0c38 AS base

FROM scratch
COPY --link --from=base / /
COPY --link --from=build --chmod=0755 /build/grpc/bazel-bin/src/compiler/grpc_ruby_plugin .
USER nobody
ENTRYPOINT ["/grpc_ruby_plugin"]
11 changes: 11 additions & 0 deletions plugins/grpc/ruby/v1.68.1/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: v1
name: buf.build/grpc/ruby
plugin_version: v1.68.1
source_url: https://github.com/grpc/grpc
description: Generates Ruby client and server stubs for the gRPC framework.
deps:
- plugin: buf.build/protocolbuffers/ruby:v29.0
output_languages:
- ruby
spdx_license_id: Apache-2.0
license_url: https://github.com/grpc/grpc/blob/v1.68.1/LICENSE
1 change: 1 addition & 0 deletions tests/testdata/buf.build/grpc/cpp/v1.68.1/eliza/plugin.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:+TEOhXAY3kEbot+Yi4zMrlVqpygzcZGd8rNsYRm1K/c=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:QNggIsJlvPRCdsT8EEOrIhD3r6tTDrD6KOna3Fue4JE=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:4waUym8vI0ZEOq/TtnJRKRUPmHk4QL8zPXRwJhywvI0=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:kxBF97RNEQQiB/oEduqOgDZAxiXauyz+6hguxnCyP7I=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:GyUULsorX1q2KwFdZqSqNqDnm6LUTrWpVdxuOSnAWjE=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:nDHCFj9g6R8wHoPXC15eTV7epeS59ZKO4Li60KPTonQ=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:xH0+e+UVLoU5KFcWSB5RfrGIxbyztCgFOquLQjg2/ps=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:P+OQBrxyTpehogGY3ZUlcIQ2pRq1iA9xpxjKXSN7u2E=
1 change: 1 addition & 0 deletions tests/testdata/buf.build/grpc/php/v1.68.1/eliza/plugin.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:gCX+94Y87fKbGc7nBkZ5sqxwMypA12/rrOdVb9YaOkY=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:0h6mmZ/IPFQQD8Mq95Adum4ekVPiiZy05xjy3uqhI48=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:tzSa6/8xdKOIrF60gIktE2W8FbyoVb782wtuyK8wYcY=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:/bm8y8KHZ5OaVGv2GDuXQc1ADOO5BrN+KJXEJO4iMy0=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:y47G0y23L+GoClu0Kfl4ZgiV++TIrlmPeBxw0sKANjA=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:jT5MBhIRa08sICxgjVvNAQgauC2GnD8G9OZ64P+N5gY=

0 comments on commit 80a6487

Please sign in to comment.