Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mercari-grpc-federation and grpc-java plugins #1155

Merged
merged 2 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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/v0.13.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# syntax=docker/dockerfile:1.7
FROM --platform=$BUILDPLATFORM golang:1.22.2-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@v0.13.7 \
&& 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/v0.13.7/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: v0.13.7
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/v0.13.7/LICENSE
2 changes: 2 additions & 0 deletions plugins/grpc/java/v1.63.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
21 changes: 21 additions & 0 deletions plugins/grpc/java/v1.63.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# syntax=docker/dockerfile:1.7
FROM debian:bookworm-20240311 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.63.0/protoc-gen-grpc-java-1.63.0-linux-${arch}.exe

FROM gcr.io/distroless/base-debian12:latest@sha256:611d30d7f6d9992c37b1e1a212eefdf1f7c671deb56db3707e24eb01da8c4c2a
COPY --from=build --link --chmod=0755 --chown=root:root /build/protoc-gen-grpc-java .
USER nobody
ENTRYPOINT [ "/protoc-gen-grpc-java" ]
25 changes: 25 additions & 0 deletions plugins/grpc/java/v1.63.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: v1
name: buf.build/grpc/java
plugin_version: v1.63.0
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:v25.3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to keep this pinned to < 26.x until the upstream grpc/grpc-java#11015 issue is resolved.

output_languages:
- java
spdx_license_id: Apache-2.0
license_url: https://github.com/grpc/grpc-java/blob/v1.63.0/LICENSE
registry:
maven:
deps:
- io.grpc:grpc-core:1.63.0
- io.grpc:grpc-protobuf:1.63.0
- io.grpc:grpc-stub:1.63.0
additional_runtimes:
- name: lite
deps:
- io.grpc:grpc-core:1.63.0
- io.grpc:grpc-protobuf-lite:1.63.0
- io.grpc:grpc-stub:1.63.0
opts: [lite]
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:WO7fZxUYiUorlhXAAEA5uX+CTSA1fWFxXmDMLh+SatE=
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:Hcazyvn9RPk6tdSeJ3FxPWfarLDCUWL6C6vqNLlGnP4=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:R/OtadGyJEwACiI3CXfdzvY5LJ1S0MOwcvKiYLyyMlU=