diff --git a/plugins/bufbuild/py/v0.4.0/.dockerignore b/plugins/bufbuild/py/v0.4.0/.dockerignore new file mode 100644 index 000000000..c8a679bc6 --- /dev/null +++ b/plugins/bufbuild/py/v0.4.0/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!requirements.txt diff --git a/plugins/bufbuild/py/v0.4.0/Dockerfile b/plugins/bufbuild/py/v0.4.0/Dockerfile new file mode 100644 index 000000000..19ee6b307 --- /dev/null +++ b/plugins/bufbuild/py/v0.4.0/Dockerfile @@ -0,0 +1,18 @@ +# syntax=docker/dockerfile:1.26 +FROM python:3.13.15-trixie@sha256:4a0820d8b1b1a1e012a23ff9a1296a3e28b48896a4d27a328a91ee197ce619d9 AS build +WORKDIR /app +RUN python -mvenv /app +ADD /requirements.txt requirements.txt +RUN . ./bin/activate \ + && pip install --no-cache-dir -r requirements.txt \ + && pip uninstall --yes pip setuptools \ + && rm -f requirements.txt bin/activate.fish bin/activate.csh bin/Activate.ps1 \ + && ln -sf /usr/bin/python /app/bin/python + +FROM gcr.io/distroless/python3-debian13:latest@sha256:f2b206661cee3edb44f132d7f054a9ced96f671d8a973de0db750895c9acb2fb AS base + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 /app /app +USER nobody +CMD [ "/app/bin/protoc-gen-py" ] diff --git a/plugins/bufbuild/py/v0.4.0/buf.plugin.yaml b/plugins/bufbuild/py/v0.4.0/buf.plugin.yaml new file mode 100644 index 000000000..378519e9b --- /dev/null +++ b/plugins/bufbuild/py/v0.4.0/buf.plugin.yaml @@ -0,0 +1,20 @@ +version: v1 +name: buf.build/bufbuild/py +plugin_version: v0.4.0 +source_url: https://github.com/bufbuild/protobuf-py +description: Generates idiomatic Python code from Protocol Buffers definitions using protobuf-py. +spdx_license_id: Apache-2.0 +license_url: https://github.com/bufbuild/protobuf-py/blob/v0.4.0/LICENSE +output_languages: +- python +registry: + python: + package_type: "runtime" + requires_python: ">=3.10" + deps: + # https://pypi.org/project/protobuf-py/ + - "protobuf-py>=0.4.0" + opts: + # Produce PEP 420 namespace packages so the py, grpc-py, and dependency + # SDKs for a module can share the same top-level package. + - init_files=false diff --git a/plugins/bufbuild/py/v0.4.0/requirements.txt b/plugins/bufbuild/py/v0.4.0/requirements.txt new file mode 100644 index 000000000..0b26ec129 --- /dev/null +++ b/plugins/bufbuild/py/v0.4.0/requirements.txt @@ -0,0 +1,2 @@ +protoc-gen-py==0.4.0 +protobuf-py==0.4.0 diff --git a/plugins/grpc/java/v1.84.0/.dockerignore b/plugins/grpc/java/v1.84.0/.dockerignore new file mode 100644 index 000000000..7ff6309df --- /dev/null +++ b/plugins/grpc/java/v1.84.0/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!pom.xml diff --git a/plugins/grpc/java/v1.84.0/Dockerfile b/plugins/grpc/java/v1.84.0/Dockerfile new file mode 100644 index 000000000..fe63fd044 --- /dev/null +++ b/plugins/grpc/java/v1.84.0/Dockerfile @@ -0,0 +1,29 @@ +# syntax=docker/dockerfile:1.26 +FROM debian:trixie-20260824@sha256:f324c7ff54321e8d9c588493a20244965938ce0aa50bbd1022d38010e9ffc4b1 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.84.0/protoc-gen-grpc-java-1.84.0-linux-${arch}.exe + +FROM gcr.io/distroless/cc-debian13:latest@sha256:9b615fff20e1a4fad29c2b30562580b212c7dd5e2225236735cca0070ed11c78 AS base + +FROM maven:3.9.11-eclipse-temurin-21 AS maven-deps +COPY pom.xml /tmp/pom.xml +RUN cd /tmp && mvn -f pom.xml dependency:go-offline + +FROM scratch +COPY --link --from=base / / +COPY --link --from=build --chmod=0755 --chown=root:root /build/protoc-gen-grpc-java . +COPY --from=maven-deps /root/.m2/repository /maven-repository +USER nobody +ENTRYPOINT [ "/protoc-gen-grpc-java" ] diff --git a/plugins/grpc/java/v1.84.0/buf.plugin.yaml b/plugins/grpc/java/v1.84.0/buf.plugin.yaml new file mode 100644 index 000000000..35e22bbb5 --- /dev/null +++ b/plugins/grpc/java/v1.84.0/buf.plugin.yaml @@ -0,0 +1,30 @@ +version: v1 +name: buf.build/grpc/java +plugin_version: v1.84.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:v36.1 +output_languages: + - java +spdx_license_id: Apache-2.0 +license_url: https://github.com/grpc/grpc-java/blob/v1.84.0/LICENSE +registry: + maven: + deps: + - io.grpc:grpc-core:1.84.0 + - io.grpc:grpc-protobuf:1.84.0 + - io.grpc:grpc-stub:1.84.0 + # Add direct dependency on newer protobuf as gRPC is still on 3.25.8 + - com.google.protobuf:protobuf-java:4.36.1 + additional_runtimes: + - name: lite + deps: + - io.grpc:grpc-core:1.84.0 + - io.grpc:grpc-protobuf-lite:1.84.0 + - io.grpc:grpc-stub:1.84.0 + # Add direct dependency on newer protobuf as gRPC is still on 3.25.8 + - com.google.protobuf:protobuf-javalite:4.36.1 + - build.buf:protobuf-javalite:4.36.1 + opts: [lite] diff --git a/plugins/grpc/java/v1.84.0/pom.xml b/plugins/grpc/java/v1.84.0/pom.xml new file mode 100644 index 000000000..61ea58982 --- /dev/null +++ b/plugins/grpc/java/v1.84.0/pom.xml @@ -0,0 +1,44 @@ + + 4.0.0 + temp + temp + 1.0 + + + io.grpc + grpc-core + 1.84.0 + + + io.grpc + grpc-protobuf + 1.84.0 + + + io.grpc + grpc-stub + 1.84.0 + + + com.google.protobuf + protobuf-java + 4.36.1 + + + + io.grpc + grpc-protobuf-lite + 1.84.0 + + + com.google.protobuf + protobuf-javalite + 4.36.1 + + + build.buf + protobuf-javalite + 4.36.1 + + + diff --git a/tests/testdata/buf.build/bufbuild/py/v0.4.0/eliza/plugin.sum b/tests/testdata/buf.build/bufbuild/py/v0.4.0/eliza/plugin.sum new file mode 100644 index 000000000..91896cb81 --- /dev/null +++ b/tests/testdata/buf.build/bufbuild/py/v0.4.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:C7/HzSNwuNq5SxoaJ4FI9hkJnmFIiiexTn3aANdc44Y= diff --git a/tests/testdata/buf.build/bufbuild/py/v0.4.0/petapis/plugin.sum b/tests/testdata/buf.build/bufbuild/py/v0.4.0/petapis/plugin.sum new file mode 100644 index 000000000..ba0ad6c78 --- /dev/null +++ b/tests/testdata/buf.build/bufbuild/py/v0.4.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:HbSCznhYuqjJGQmhFW7oywbQC8k0LVX9UrNZSm6m3gI= diff --git a/tests/testdata/buf.build/grpc/java/v1.84.0/eliza/plugin.sum b/tests/testdata/buf.build/grpc/java/v1.84.0/eliza/plugin.sum new file mode 100644 index 000000000..6b03336c8 --- /dev/null +++ b/tests/testdata/buf.build/grpc/java/v1.84.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:abVqnZfKuwUcrLQyb+Lu2QqyVxyEnfIosZqrc8Lv/f0= diff --git a/tests/testdata/buf.build/grpc/java/v1.84.0/petapis/plugin.sum b/tests/testdata/buf.build/grpc/java/v1.84.0/petapis/plugin.sum new file mode 100644 index 000000000..a771e8f16 --- /dev/null +++ b/tests/testdata/buf.build/grpc/java/v1.84.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:LtrVq0lTE5qfsjeZj2BqKoPibzJpnzDsSY/jO/SrmoY=