Skip to content

Commit

Permalink
bump protoc, googleapis for jsonschema (#478)
Browse files Browse the repository at this point in the history
Signed-off-by: Bob Callaway <[email protected]>
  • Loading branch information
bobcallaway authored Jan 16, 2025
1 parent 134d573 commit 8e5c174
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
18 changes: 8 additions & 10 deletions protoc-builder/Dockerfile.jsonschema
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
# TODO: use golang image
FROM alpine@sha256:56fa17d2a7e7f168a043a2712e63aed1f8543aeafdcee47c58dcffe38ed51099
RUN apk add --update protoc protobuf-dev go git
FROM golang:1.23.4-alpine@sha256:c23339199a08b0e12032856908589a6d41a0dab141b8b3b21f156fc571a3f1d3 AS jsonschema-builder

ADD hack/jsonschema/go.* hack/jsonschema/tools.go tools/

# the specific versions of these tools are in hack/go.mod so that Dependabot can bump them for updates
RUN cd tools && go build --trimpath -o /usr/local/bin/protoc-gen-jsonschema github.com/chrusty/protoc-gen-jsonschema/cmd/protoc-gen-jsonschema

# This is required to get the field_behavior.proto file
# NOTE: --filter=tree:0 performs a treeless clone; we do this to optimize cloning
# this otherwise relatively heavy repository.
RUN git clone --filter=tree:0 https://github.com/googleapis/googleapis.git /googleapis \
&& cd /googleapis \
&& git checkout 95f0f2b2aee51e460646320d6e8f2ce75c463f5a
FROM gcr.io/distroless/static-debian12:nonroot@sha256:6ec5aa99dc335666e79dc64e4a6c8b89c33a543a1967f20d360922a80dd21f02

ENTRYPOINT ["/usr/bin/protoc", "--plugin=protoc-gen-jsonschema=/usr/local/bin/protoc-gen-jsonschema" ]
COPY --from=jsonschema-builder /usr/local/bin/protoc-gen-jsonschema /usr/local/bin/
COPY --from=protoc-base:jsonschema /protobuf/bin/protoc /usr/local/bin/
COPY --from=protoc-base:jsonschema /protobuf/include/google /opt/include/google
COPY --from=protoc-base:jsonschema /googleapis /googleapis

ENTRYPOINT ["/usr/local/bin/protoc", "--plugin=protoc-gen-jsonschema=/usr/local/bin/protoc-gen-jsonschema" ]
7 changes: 7 additions & 0 deletions protoc-builder/versions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@
GO_PROTOC_VERSION=v29.3
GO_PROTOC_CHECKSUM=sha256:3e866620c5be27664f3d2fa2d656b5f3e09b5152b42f1bedbf427b333e90021a
GO_GOOGLEAPIS_COMMIT=fc2697ec5327db9073b4e0aa140248f19b15d7ef

JSONSCHEMA_PROTOC_VERSION=v29.3
JSONSCHEMA_PROTOC_CHECKSUM=sha256:3e866620c5be27664f3d2fa2d656b5f3e09b5152b42f1bedbf427b333e90021a
JSONSCHEMA_GOOGLEAPIS_COMMIT=fc2697ec5327db9073b4e0aa140248f19b15d7ef

PYTHON_PROTOC_VERSION=v29.3
PYTHON_PROTOC_CHECKSUM=sha256:3e866620c5be27664f3d2fa2d656b5f3e09b5152b42f1bedbf427b333e90021a
PYTHON_GOOGLEAPIS_COMMIT=fc2697ec5327db9073b4e0aa140248f19b15d7ef

RUBY_PROTOC_VERSION=v29.3
RUBY_PROTOC_CHECKSUM=sha256:3e866620c5be27664f3d2fa2d656b5f3e09b5152b42f1bedbf427b333e90021a
RUBY_GOOGLEAPIS_COMMIT=fc2697ec5327db9073b4e0aa140248f19b15d7ef

RUST_PROTOC_VERSION=v29.3
RUST_PROTOC_CHECKSUM=sha256:3e866620c5be27664f3d2fa2d656b5f3e09b5152b42f1bedbf427b333e90021a
RUST_GOOGLEAPIS_COMMIT=fc2697ec5327db9073b4e0aa140248f19b15d7ef
Expand Down

0 comments on commit 8e5c174

Please sign in to comment.