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 grpc-ecosystem plugins and mercari-grpc-federation #1438

Merged
merged 1 commit into from
Aug 19, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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/v1.3.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# syntax=docker/dockerfile:1.9
FROM --platform=$BUILDPLATFORM golang:1.23.0-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/[email protected] \
&& 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.3.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.3.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.3.1/LICENSE
3 changes: 3 additions & 0 deletions plugins/grpc-ecosystem/gateway/v2.22.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!Dockerfile
!separate_pkg_additional_imports.patch
21 changes: 21 additions & 0 deletions plugins/grpc-ecosystem/gateway/v2.22.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# syntax=docker/dockerfile:1.9
FROM --platform=$BUILDPLATFORM golang:1.23.0-bookworm AS build

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

WORKDIR /tmp
RUN git clone --depth 1 --branch v2.22.0 https://github.com/grpc-ecosystem/grpc-gateway.git
COPY --link separate_pkg_additional_imports.patch /tmp/separate_pkg_additional_imports.patch
WORKDIR /tmp/grpc-gateway
RUN git apply /tmp/separate_pkg_additional_imports.patch
WORKDIR /tmp/grpc-gateway/protoc-gen-grpc-gateway
RUN --mount=type=cache,target=/go/pkg/mod \
go install -ldflags="-s -w" -trimpath \
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-grpc-gateway /go/bin/protoc-gen-grpc-gateway || 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-gateway /
USER nobody
ENTRYPOINT [ "/protoc-gen-grpc-gateway" ]
23 changes: 23 additions & 0 deletions plugins/grpc-ecosystem/gateway/v2.22.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: v1
name: buf.build/grpc-ecosystem/gateway
plugin_version: v2.22.0
source_url: https://github.com/grpc-ecosystem/grpc-gateway
integration_guide_url: https://github.com/grpc-ecosystem/grpc-gateway#usage
description: gRPC to JSON proxy generator following the gRPC HTTP spec.
output_languages:
- go
registry:
go:
min_version: "1.21"
deps:
- module: github.com/grpc-ecosystem/grpc-gateway/v2
version: v2.22.0
opts:
- paths=source_relative
- standalone=true
- separate_package=true
deps:
- plugin: buf.build/protocolbuffers/go:v1.34.2
- plugin: buf.build/grpc/go:v1.5.1
spdx_license_id: BSD-3-Clause
license_url: https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.22.0/LICENSE.txt
Loading
Loading