Skip to content

Commit

Permalink
Update grpc and mercari-grpc-federation plugins (#1326)
Browse files Browse the repository at this point in the history
  • Loading branch information
app-token-plugins[bot] authored Jul 1, 2024
1 parent 8910606 commit 74a1113
Show file tree
Hide file tree
Showing 36 changed files with 285 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
16 changes: 16 additions & 0 deletions plugins/community/mercari-grpc-federation/v1.0.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# syntax=docker/dockerfile:1.8
FROM --platform=$BUILDPLATFORM golang:1.22.4-bookworm AS build

ARG TARGETOS TARGETARCH
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH

RUN --mount=type=cache,target=/go/pkg/mod \
go install -ldflags="-s -w" -trimpath github.com/mercari/grpc-federation/cmd/protoc-gen-grpc-federation@v1.0.1 \
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-grpc-federation /go/bin/protoc-gen-grpc-federation || true

FROM scratch
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-grpc-federation .
ENV GOROOT /
USER nobody
ENTRYPOINT [ "/protoc-gen-grpc-federation" ]
10 changes: 10 additions & 0 deletions plugins/community/mercari-grpc-federation/v1.0.1/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1
name: buf.build/community/mercari-grpc-federation
plugin_version: v1.0.1
source_url: https://github.com/mercari/grpc-federation
integration_guide_url: https://github.com/mercari/grpc-federation/blob/main/docs/getting_started.md
description: Generates a gRPC server by writing a custom option in Protocol Buffers
output_languages:
- go
spdx_license_id: MIT
license_url: https://github.com/mercari/grpc-federation/blob/v1.0.1/LICENSE
2 changes: 2 additions & 0 deletions plugins/grpc/cpp/v1.65.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
26 changes: 26 additions & 0 deletions plugins/grpc/cpp/v1.65.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# syntax=docker/dockerfile:1.8
FROM debian:bookworm-20240612 AS build

ARG TARGETARCH

RUN apt-get update \
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip
RUN arch=${TARGETARCH}; \
if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \
curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-linux-${arch} \
&& chmod +x /usr/local/bin/bazel

WORKDIR /build

RUN git clone --depth 1 --branch v1.65.0 https://github.com/grpc/grpc
WORKDIR /build/grpc
RUN bazel build //src/compiler:grpc_plugin_support
RUN bazel build //src/compiler:grpc_cpp_plugin.stripped

FROM gcr.io/distroless/cc-debian12:latest@sha256:e1065a1d58800a7294f74e67c32ec4146d09d6cbe471c1fa7ed456b2d2bf06e0 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"]
11 changes: 11 additions & 0 deletions plugins/grpc/cpp/v1.65.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: v1
name: buf.build/grpc/cpp
plugin_version: v1.65.0
source_url: https://github.com/grpc/grpc
description: Generates C++ client and server stubs for the gRPC framework.
deps:
- plugin: buf.build/protocolbuffers/cpp:v26.1
output_languages:
- cpp
spdx_license_id: Apache-2.0
license_url: https://github.com/grpc/grpc/blob/v1.65.0/LICENSE
2 changes: 2 additions & 0 deletions plugins/grpc/csharp/v1.65.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
26 changes: 26 additions & 0 deletions plugins/grpc/csharp/v1.65.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# syntax=docker/dockerfile:1.8
FROM debian:bookworm-20240612 AS build

ARG TARGETARCH

RUN apt-get update \
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip
RUN arch=${TARGETARCH}; \
if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \
curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-linux-${arch} \
&& chmod +x /usr/local/bin/bazel

WORKDIR /build

RUN git clone --depth 1 --branch v1.65.0 https://github.com/grpc/grpc
WORKDIR /build/grpc
RUN bazel build //src/compiler:grpc_plugin_support
RUN bazel build //src/compiler:grpc_csharp_plugin.stripped

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

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

ARG TARGETARCH

RUN apt-get update \
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip
RUN arch=${TARGETARCH}; \
if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \
curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-linux-${arch} \
&& chmod +x /usr/local/bin/bazel

WORKDIR /build

RUN git clone --depth 1 --branch v1.65.0 https://github.com/grpc/grpc
WORKDIR /build/grpc
RUN bazel build //src/compiler:grpc_plugin_support
RUN bazel build //src/compiler:grpc_objective_c_plugin.stripped

FROM gcr.io/distroless/cc-debian12:latest@sha256:e1065a1d58800a7294f74e67c32ec4146d09d6cbe471c1fa7ed456b2d2bf06e0 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.65.0/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.65.0
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:v26.1
output_languages:
- objective_c
spdx_license_id: Apache-2.0
license_url: https://github.com/grpc/grpc/blob/v1.65.0/LICENSE
2 changes: 2 additions & 0 deletions plugins/grpc/php/v1.65.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
26 changes: 26 additions & 0 deletions plugins/grpc/php/v1.65.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# syntax=docker/dockerfile:1.8
FROM debian:bookworm-20240612 AS build

ARG TARGETARCH

RUN apt-get update \
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip
RUN arch=${TARGETARCH}; \
if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \
curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-linux-${arch} \
&& chmod +x /usr/local/bin/bazel

WORKDIR /build

RUN git clone --depth 1 --branch v1.65.0 https://github.com/grpc/grpc
WORKDIR /build/grpc
RUN bazel build //src/compiler:grpc_plugin_support
RUN bazel build //src/compiler:grpc_php_plugin.stripped

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

FROM scratch
COPY --link --from=base / /
COPY --from=build --link --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.65.0/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.65.0
source_url: https://github.com/grpc/grpc
description: Generates PHP client and server stubs for the gRPC framework.
deps:
- plugin: buf.build/protocolbuffers/php:v26.1
output_languages:
- php
spdx_license_id: Apache-2.0
license_url: https://github.com/grpc/grpc/blob/v1.65.0/LICENSE
2 changes: 2 additions & 0 deletions plugins/grpc/python/v1.65.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
26 changes: 26 additions & 0 deletions plugins/grpc/python/v1.65.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# syntax=docker/dockerfile:1.8
FROM debian:bookworm-20240612 AS build

ARG TARGETARCH

RUN apt-get update \
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip
RUN arch=${TARGETARCH}; \
if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \
curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-linux-${arch} \
&& chmod +x /usr/local/bin/bazel

WORKDIR /build

RUN git clone --depth 1 --branch v1.65.0 https://github.com/grpc/grpc
WORKDIR /build/grpc
RUN bazel build //src/compiler:grpc_plugin_support
RUN bazel build //src/compiler:grpc_python_plugin.stripped

FROM gcr.io/distroless/cc-debian12:latest@sha256:e1065a1d58800a7294f74e67c32ec4146d09d6cbe471c1fa7ed456b2d2bf06e0 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.65.0/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.65.0
source_url: https://github.com/grpc/grpc
description: Generates Python client and server stubs for the gRPC framework.
deps:
- plugin: buf.build/protocolbuffers/python:v26.1
output_languages:
- python
spdx_license_id: Apache-2.0
license_url: https://github.com/grpc/grpc/blob/v1.65.0/LICENSE
registry:
python:
package_type: "runtime"
# https://github.com/grpc/grpc/tree/v1.65.0/src/python/grpcio#supported-python-versions
requires_python: ">=3.8"
deps:
# https://pypi.org/project/grpcio/
- "grpcio"
2 changes: 2 additions & 0 deletions plugins/grpc/ruby/v1.65.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
26 changes: 26 additions & 0 deletions plugins/grpc/ruby/v1.65.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# syntax=docker/dockerfile:1.8
FROM debian:bookworm-20240612 AS build

ARG TARGETARCH

RUN apt-get update \
&& apt-get install -y curl git cmake build-essential autoconf clang libc++-dev libtool pkg-config unzip zip
RUN arch=${TARGETARCH}; \
if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \
curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.2.1/bazel-7.2.1-linux-${arch} \
&& chmod +x /usr/local/bin/bazel

WORKDIR /build

RUN git clone --depth 1 --branch v1.65.0 https://github.com/grpc/grpc
WORKDIR /build/grpc
RUN bazel build //src/compiler:grpc_plugin_support
RUN bazel build //src/compiler:grpc_ruby_plugin.stripped

FROM gcr.io/distroless/cc-debian12:latest@sha256:e1065a1d58800a7294f74e67c32ec4146d09d6cbe471c1fa7ed456b2d2bf06e0 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.65.0/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.65.0
source_url: https://github.com/grpc/grpc
description: Generates Ruby client and server stubs for the gRPC framework.
deps:
- plugin: buf.build/protocolbuffers/ruby:v26.1
output_languages:
- ruby
spdx_license_id: Apache-2.0
license_url: https://github.com/grpc/grpc/blob/v1.65.0/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:ZYnkzVH44TiAMoU+pY0UQ4CopaTFO0+zhYAXk09YiZg=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
1 change: 1 addition & 0 deletions tests/testdata/buf.build/grpc/cpp/v1.65.0/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:BVCDqYwFBLMbpdwhUznEKZl71YGKzWxQjMCWHshAvzA=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:DqIk9tDTR6qNlwrVsz667IxNJfMGL2dLcjanmrIkTvU=
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.65.0/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 74a1113

Please sign in to comment.