Skip to content

Commit

Permalink
Update knit-ts, grpc-java, and protoc plugins (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
app-token-plugins[bot] authored May 9, 2023
1 parent 4eeb714 commit 026abce
Show file tree
Hide file tree
Showing 73 changed files with 682 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/bufbuild/knit-ts/v0.0.2/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!Dockerfile
!package*.json
11 changes: 11 additions & 0 deletions plugins/bufbuild/knit-ts/v0.0.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# syntax=docker/dockerfile:1.4
FROM node:18.16.0-alpine3.17 AS build
WORKDIR /app
COPY --link package*.json .
RUN npm ci
RUN sed -i -e 's|/usr/bin/env node|/nodejs/bin/node|g' /app/node_modules/@bufbuild/protoc-gen-knit-ts/bin/protoc-gen-knit-ts

FROM gcr.io/distroless/nodejs18-debian11
COPY --link --from=build /app /app
USER nobody
ENTRYPOINT [ "/app/node_modules/.bin/protoc-gen-knit-ts" ]
13 changes: 13 additions & 0 deletions plugins/bufbuild/knit-ts/v0.0.2/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: v1
name: buf.build/bufbuild/knit-ts
plugin_version: v0.0.2
source_url: https://github.com/bufbuild/knit-ts
description: Generates Knit schemas needed to use the Knit client in web browsers and Node.js.
output_languages:
- typescript
registry:
npm:
import_style: module
rewrite_import_path_suffix: knit.js
spdx_license_id: Apache-2.0
license_url: https://github.com/bufbuild/knit-ts/blob/v0.0.2/LICENSE
93 changes: 93 additions & 0 deletions plugins/bufbuild/knit-ts/v0.0.2/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions plugins/bufbuild/knit-ts/v0.0.2/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "plugins-bufbuild-knit-ts",
"version": "0.0.2",
"dependencies": {
"@bufbuild/protoc-gen-knit-ts": "0.0.2"
}
}
2 changes: 2 additions & 0 deletions plugins/grpc/java/v1.55.1/.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.55.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# syntax=docker/dockerfile:1.4
FROM debian:bullseye-20230502 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.55.1/protoc-gen-grpc-java-1.55.1-linux-${arch}.exe

FROM gcr.io/distroless/base-debian11
COPY --from=build --link --chmod=0755 --chown=root:root /build/protoc-gen-grpc-java .
USER nobody
ENTRYPOINT [ "/protoc-gen-grpc-java" ]
24 changes: 24 additions & 0 deletions plugins/grpc/java/v1.55.1/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: v1
name: buf.build/grpc/java
plugin_version: v1.55.1
source_url: https://github.com/grpc/grpc-java
description: Generates Java client and server stubs for the gRPC framework.
deps:
- plugin: buf.build/protocolbuffers/java:v23.0
output_languages:
- java
spdx_license_id: Apache-2.0
license_url: https://github.com/grpc/grpc-java/blob/v1.55.1/LICENSE
registry:
maven:
deps:
- io.grpc:grpc-core:1.55.1
- io.grpc:grpc-protobuf:1.55.1
- io.grpc:grpc-stub:1.55.1
additional_runtimes:
- name: lite
deps:
- io.grpc:grpc-core:1.55.1
- io.grpc:grpc-protobuf-lite:1.55.1
- io.grpc:grpc-stub:1.55.1
opts: [lite]
4 changes: 4 additions & 0 deletions plugins/protocolbuffers/cpp/v23.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*
!BUILD
!cpp.cc
!Dockerfile
7 changes: 7 additions & 0 deletions plugins/protocolbuffers/cpp/v23.0/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cc_binary(
name = "protoc-gen-cpp",
srcs = ["cpp.cc"],
deps = [
"//:protoc_lib",
],
)
24 changes: 24 additions & 0 deletions plugins/protocolbuffers/cpp/v23.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# syntax=docker/dockerfile:1.4
FROM debian:bullseye-20230502 AS build

ARG TARGETARCH

RUN apt-get update \
&& apt-get install -y curl git cmake build-essential g++ 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/6.1.2/bazel-6.1.2-linux-${arch} \
&& chmod +x /usr/local/bin/bazel

WORKDIR /build
RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v23.0/protobuf-23.0.tar.gz \
&& tar --strip-components=1 -zxf protoc.tar.gz \
&& rm protoc.tar.gz
RUN bazel build '//:protoc_lib'
COPY --link BUILD cpp.cc plugins/
RUN bazel build '//plugins:protoc-gen-cpp.stripped'

FROM gcr.io/distroless/cc-debian11
COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-cpp .
USER nobody
ENTRYPOINT ["/protoc-gen-cpp"]
9 changes: 9 additions & 0 deletions plugins/protocolbuffers/cpp/v23.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: v1
name: buf.build/protocolbuffers/cpp
plugin_version: v23.0
source_url: https://github.com/protocolbuffers/protobuf
description: Base types for C++. Generates message and enum types.
output_languages:
- cpp
spdx_license_id: BSD-3-Clause
license_url: https://github.com/protocolbuffers/protobuf/blob/v23.0/LICENSE
7 changes: 7 additions & 0 deletions plugins/protocolbuffers/cpp/v23.0/cpp.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <google/protobuf/compiler/cpp/generator.h>
#include <google/protobuf/compiler/plugin.h>

int main(int argc, char *argv[]) {
google::protobuf::compiler::cpp::CppGenerator generator;
return google::protobuf::compiler::PluginMain(argc, argv, &generator);
}
4 changes: 4 additions & 0 deletions plugins/protocolbuffers/csharp/v23.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*
!BUILD
!csharp.cc
!Dockerfile
7 changes: 7 additions & 0 deletions plugins/protocolbuffers/csharp/v23.0/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cc_binary(
name = "protoc-gen-csharp",
srcs = ["csharp.cc"],
deps = [
"//:protoc_lib",
],
)
24 changes: 24 additions & 0 deletions plugins/protocolbuffers/csharp/v23.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# syntax=docker/dockerfile:1.4
FROM debian:bullseye-20230502 AS build

ARG TARGETARCH

RUN apt-get update \
&& apt-get install -y curl git cmake build-essential g++ 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/6.1.2/bazel-6.1.2-linux-${arch} \
&& chmod +x /usr/local/bin/bazel

WORKDIR /build
RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v23.0/protobuf-23.0.tar.gz \
&& tar --strip-components=1 -zxf protoc.tar.gz \
&& rm protoc.tar.gz
RUN bazel build '//:protoc_lib'
COPY --link BUILD csharp.cc plugins/
RUN bazel build '//plugins:protoc-gen-csharp.stripped'

FROM gcr.io/distroless/cc-debian11
COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-csharp .
USER nobody
ENTRYPOINT ["/protoc-gen-csharp"]
9 changes: 9 additions & 0 deletions plugins/protocolbuffers/csharp/v23.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: v1
name: buf.build/protocolbuffers/csharp
plugin_version: v23.0
source_url: https://github.com/protocolbuffers/protobuf
description: Base types for C#. Generates message and enum types.
output_languages:
- csharp
spdx_license_id: BSD-3-Clause
license_url: https://github.com/protocolbuffers/protobuf/blob/v23.0/LICENSE
7 changes: 7 additions & 0 deletions plugins/protocolbuffers/csharp/v23.0/csharp.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <google/protobuf/compiler/csharp/csharp_generator.h>
#include <google/protobuf/compiler/plugin.h>

int main(int argc, char *argv[]) {
google::protobuf::compiler::csharp::Generator generator;
return google::protobuf::compiler::PluginMain(argc, argv, &generator);
}
4 changes: 4 additions & 0 deletions plugins/protocolbuffers/java/v23.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*
!BUILD
!Dockerfile
!java.cc
7 changes: 7 additions & 0 deletions plugins/protocolbuffers/java/v23.0/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cc_binary(
name = "protoc-gen-java",
srcs = ["java.cc"],
deps = [
"//:protoc_lib",
],
)
24 changes: 24 additions & 0 deletions plugins/protocolbuffers/java/v23.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# syntax=docker/dockerfile:1.4
FROM debian:bullseye-20230502 AS build

ARG TARGETARCH

RUN apt-get update \
&& apt-get install -y curl git cmake build-essential g++ 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/6.1.2/bazel-6.1.2-linux-${arch} \
&& chmod +x /usr/local/bin/bazel

WORKDIR /build
RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v23.0/protobuf-23.0.tar.gz \
&& tar --strip-components=1 -zxf protoc.tar.gz \
&& rm protoc.tar.gz
RUN bazel build '//:protoc_lib'
COPY --link BUILD java.cc plugins/
RUN bazel build '//plugins:protoc-gen-java.stripped'

FROM gcr.io/distroless/cc-debian11
COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-java .
USER nobody
ENTRYPOINT ["/protoc-gen-java"]
18 changes: 18 additions & 0 deletions plugins/protocolbuffers/java/v23.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: v1
name: buf.build/protocolbuffers/java
plugin_version: v23.0
source_url: https://github.com/protocolbuffers/protobuf
description: Base types for Java. Generates message and enum types.
output_languages:
- java
spdx_license_id: BSD-3-Clause
license_url: https://github.com/protocolbuffers/protobuf/blob/v23.0/LICENSE
registry:
maven:
deps:
- com.google.protobuf:protobuf-java:3.23.0
additional_runtimes:
- name: lite
deps:
- com.google.protobuf:protobuf-javalite:3.23.0
opts: [lite]
7 changes: 7 additions & 0 deletions plugins/protocolbuffers/java/v23.0/java.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include <google/protobuf/compiler/java/generator.h>
#include <google/protobuf/compiler/plugin.h>

int main(int argc, char *argv[]) {
google::protobuf::compiler::java::JavaGenerator generator;
return google::protobuf::compiler::PluginMain(argc, argv, &generator);
}
4 changes: 4 additions & 0 deletions plugins/protocolbuffers/kotlin/v23.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*
!BUILD
!Dockerfile
!kotlin.cc
7 changes: 7 additions & 0 deletions plugins/protocolbuffers/kotlin/v23.0/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cc_binary(
name = "protoc-gen-kotlin",
srcs = ["kotlin.cc"],
deps = [
"//:protoc_lib",
],
)
24 changes: 24 additions & 0 deletions plugins/protocolbuffers/kotlin/v23.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# syntax=docker/dockerfile:1.4
FROM debian:bullseye-20230502 AS build

ARG TARGETARCH

RUN apt-get update \
&& apt-get install -y curl git cmake build-essential g++ 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/6.1.2/bazel-6.1.2-linux-${arch} \
&& chmod +x /usr/local/bin/bazel

WORKDIR /build
RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v23.0/protobuf-23.0.tar.gz \
&& tar --strip-components=1 -zxf protoc.tar.gz \
&& rm protoc.tar.gz
RUN bazel build '//:protoc_lib'
COPY --link BUILD kotlin.cc plugins/
RUN bazel build '//plugins:protoc-gen-kotlin.stripped'

FROM gcr.io/distroless/cc-debian11
COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-kotlin .
USER nobody
ENTRYPOINT ["/protoc-gen-kotlin"]
Loading

0 comments on commit 026abce

Please sign in to comment.