Skip to content

Commit e752265

Browse files
Update mercari-grpc-federation and grpc-java plugins (#1155)
1 parent 0d61e3c commit e752265

File tree

11 files changed

+81
-0
lines changed

11 files changed

+81
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!Dockerfile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# syntax=docker/dockerfile:1.7
2+
FROM --platform=$BUILDPLATFORM golang:1.22.2-bookworm AS build
3+
4+
ARG TARGETOS TARGETARCH
5+
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH
6+
7+
RUN --mount=type=cache,target=/go/pkg/mod \
8+
go install -ldflags="-s -w" -trimpath github.com/mercari/grpc-federation/cmd/[email protected] \
9+
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-grpc-federation /go/bin/protoc-gen-grpc-federation || true
10+
11+
FROM scratch
12+
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
13+
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-grpc-federation .
14+
ENV GOROOT /
15+
USER nobody
16+
ENTRYPOINT [ "/protoc-gen-grpc-federation" ]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: v1
2+
name: buf.build/community/mercari-grpc-federation
3+
plugin_version: v0.13.7
4+
source_url: https://github.com/mercari/grpc-federation
5+
integration_guide_url: https://github.com/mercari/grpc-federation/blob/main/docs/getting_started.md
6+
description: Generates a gRPC server by writing a custom option in Protocol Buffers
7+
output_languages:
8+
- go
9+
spdx_license_id: MIT
10+
license_url: https://github.com/mercari/grpc-federation/blob/v0.13.7/LICENSE
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!Dockerfile

plugins/grpc/java/v1.63.0/Dockerfile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# syntax=docker/dockerfile:1.7
2+
FROM debian:bookworm-20240311 AS build
3+
4+
ARG TARGETARCH
5+
6+
WORKDIR /build
7+
RUN apt-get update \
8+
&& apt-get install -y curl
9+
RUN arch=${TARGETARCH}; \
10+
if [ "${arch}" = "arm64" ]; then\
11+
arch="aarch_64"; \
12+
elif [ "${arch}" = "amd64" ]; then\
13+
arch="x86_64"; \
14+
fi; \
15+
echo "${arch}"; \
16+
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
17+
18+
FROM gcr.io/distroless/base-debian12:latest@sha256:611d30d7f6d9992c37b1e1a212eefdf1f7c671deb56db3707e24eb01da8c4c2a
19+
COPY --from=build --link --chmod=0755 --chown=root:root /build/protoc-gen-grpc-java .
20+
USER nobody
21+
ENTRYPOINT [ "/protoc-gen-grpc-java" ]
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: v1
2+
name: buf.build/grpc/java
3+
plugin_version: v1.63.0
4+
source_url: https://github.com/grpc/grpc-java
5+
integration_guide_url: https://grpc.io/docs/languages/java/quickstart
6+
description: Generates Java client and server stubs for the gRPC framework.
7+
deps:
8+
- plugin: buf.build/protocolbuffers/java:v25.3
9+
output_languages:
10+
- java
11+
spdx_license_id: Apache-2.0
12+
license_url: https://github.com/grpc/grpc-java/blob/v1.63.0/LICENSE
13+
registry:
14+
maven:
15+
deps:
16+
- io.grpc:grpc-core:1.63.0
17+
- io.grpc:grpc-protobuf:1.63.0
18+
- io.grpc:grpc-stub:1.63.0
19+
additional_runtimes:
20+
- name: lite
21+
deps:
22+
- io.grpc:grpc-core:1.63.0
23+
- io.grpc:grpc-protobuf-lite:1.63.0
24+
- io.grpc:grpc-stub:1.63.0
25+
opts: [lite]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:WO7fZxUYiUorlhXAAEA5uX+CTSA1fWFxXmDMLh+SatE=
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:Hcazyvn9RPk6tdSeJ3FxPWfarLDCUWL6C6vqNLlGnP4=
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h1:R/OtadGyJEwACiI3CXfdzvY5LJ1S0MOwcvKiYLyyMlU=

0 commit comments

Comments
 (0)