From 19c561afd29e9f062424d7cd1baf77b8cb762d04 Mon Sep 17 00:00:00 2001 From: Michael Fridman Date: Tue, 26 Nov 2024 14:36:46 -0500 Subject: [PATCH] Add protoc-gen-bq-schema v2.0.1 (#1605) --- plugins/googlecloudplatform/bq-schema/source.yaml | 3 --- .../bq-schema/v2.0.1/.dockerignore | 2 ++ .../bq-schema/v2.0.1/Dockerfile | 15 +++++++++++++++ .../bq-schema/v2.0.1/buf.plugin.yaml | 7 +++++++ .../bq-schema/v2.0.1/bq-schema/plugin.sum | 1 + .../bq-schema/v2.0.1/eliza/plugin.sum | 1 + .../bq-schema/v2.0.1/petapis/plugin.sum | 1 + 7 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 plugins/googlecloudplatform/bq-schema/v2.0.1/.dockerignore create mode 100644 plugins/googlecloudplatform/bq-schema/v2.0.1/Dockerfile create mode 100644 plugins/googlecloudplatform/bq-schema/v2.0.1/buf.plugin.yaml create mode 100644 tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/bq-schema/plugin.sum create mode 100644 tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/petapis/plugin.sum diff --git a/plugins/googlecloudplatform/bq-schema/source.yaml b/plugins/googlecloudplatform/bq-schema/source.yaml index 45b4b5f55..08382499b 100644 --- a/plugins/googlecloudplatform/bq-schema/source.yaml +++ b/plugins/googlecloudplatform/bq-schema/source.yaml @@ -1,7 +1,4 @@ source: - # Disabled until we have a proper release - # See: https://github.com/GoogleCloudPlatform/protoc-gen-bq-schema/pull/52 - disabled: true github: owner: GoogleCloudPlatform repository: protoc-gen-bq-schema diff --git a/plugins/googlecloudplatform/bq-schema/v2.0.1/.dockerignore b/plugins/googlecloudplatform/bq-schema/v2.0.1/.dockerignore new file mode 100644 index 000000000..5d0f124ff --- /dev/null +++ b/plugins/googlecloudplatform/bq-schema/v2.0.1/.dockerignore @@ -0,0 +1,2 @@ +* +!Dockerfile diff --git a/plugins/googlecloudplatform/bq-schema/v2.0.1/Dockerfile b/plugins/googlecloudplatform/bq-schema/v2.0.1/Dockerfile new file mode 100644 index 000000000..0f9b0a040 --- /dev/null +++ b/plugins/googlecloudplatform/bq-schema/v2.0.1/Dockerfile @@ -0,0 +1,15 @@ +# syntax=docker/dockerfile:1.10 +FROM --platform=$BUILDPLATFORM golang:1.23.3-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/GoogleCloudPlatform/protoc-gen-bq-schema/v2@v2.0.1 \ + && mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-bq-schema /go/bin/protoc-gen-bq-schema || true + +FROM scratch +COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd +COPY --from=build --link /go/bin/protoc-gen-bq-schema / +USER nobody +ENTRYPOINT [ "/protoc-gen-bq-schema", "-logtostderr=true" ] diff --git a/plugins/googlecloudplatform/bq-schema/v2.0.1/buf.plugin.yaml b/plugins/googlecloudplatform/bq-schema/v2.0.1/buf.plugin.yaml new file mode 100644 index 000000000..d42125afd --- /dev/null +++ b/plugins/googlecloudplatform/bq-schema/v2.0.1/buf.plugin.yaml @@ -0,0 +1,7 @@ +version: v1 +name: buf.build/googlecloudplatform/bq-schema +plugin_version: v2.0.1 +source_url: https://github.com/GoogleCloudPlatform/protoc-gen-bq-schema +description: A plugin to convert Protobuf messages into JSON schema files for BigQuery. +spdx_license_id: Apache-2.0 +license_url: https://github.com/GoogleCloudPlatform/protoc-gen-bq-schema/blob/v2.0.1/LICENSE diff --git a/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/bq-schema/plugin.sum b/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/bq-schema/plugin.sum new file mode 100644 index 000000000..799ae9ed7 --- /dev/null +++ b/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/bq-schema/plugin.sum @@ -0,0 +1 @@ +h1:lNkjrxnPqxLv2yMj/Uk+MEnZXimFsus4qjt9W9Ys/aI= diff --git a/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/eliza/plugin.sum b/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/eliza/plugin.sum new file mode 100644 index 000000000..7d9c0f31d --- /dev/null +++ b/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/eliza/plugin.sum @@ -0,0 +1 @@ +h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= diff --git a/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/petapis/plugin.sum b/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/petapis/plugin.sum new file mode 100644 index 000000000..7d9c0f31d --- /dev/null +++ b/tests/testdata/buf.build/googlecloudplatform/bq-schema/v2.0.1/petapis/plugin.sum @@ -0,0 +1 @@ +h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=