Skip to content

Commit

Permalink
Merge branch 'master' into renovate/grpc-major-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
ido-namely authored Sep 15, 2022
2 parents acfa4ee + 20c4284 commit 2ef2f89
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,16 @@
],
depNameTemplate: "mypy-protobuf",
datasourceTemplate: "pypi",
},
{
fileMatch: [
"variables.sh$"
],
matchStrings: [
"PROTOBUF_JS_VERSION=\\$\\{PROTOBUF_JS_VERSION:-(?<currentValue>.*?)\\}\\n"
],
depNameTemplate: "protocolbuffers/protobuf-javascript",
datasourceTemplate: "github-releases",
}
],
packageRules: [
Expand Down
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ARG go_mwitkow_gpv_version
ARG go_protoc_gen_go_version
ARG go_protoc_gen_go_grpc_version
ARG mypy_version
ARG protobuf_js_version

FROM golang:$go_version-$debian_version AS build

Expand All @@ -30,6 +31,7 @@ ARG uber_prototool_version
ARG go_protoc_gen_go_version
ARG go_protoc_gen_go_grpc_version
ARG mypy_version
ARG protobuf_js_version


RUN set -ex && apt-get update && apt-get install -y --no-install-recommends \
Expand All @@ -49,7 +51,8 @@ RUN set -ex && apt-get update && apt-get install -y --no-install-recommends \

WORKDIR /tmp
RUN git clone --depth 1 --shallow-submodules -b v$grpc_version.x --recursive https://github.com/grpc/grpc && \
git clone --depth 1 --shallow-submodules -b v$grpc_java_version.x --recursive https://github.com/grpc/grpc-java.git && \
git clone --depth 1 --shallow-submodules -b v$grpc_java_version.x --recursive https://github.com/grpc/grpc-java && \
git clone --depth 1 --shallow-submodules -b $protobuf_js_version --recursive https://github.com/protocolbuffers/protobuf-javascript && \
git clone --depth 1 https://github.com/googleapis/googleapis && \
git clone --depth 1 https://github.com/googleapis/api-common-protos

Expand All @@ -63,6 +66,9 @@ RUN $bazel build //external:protocol_compiler && \
WORKDIR /tmp/grpc-java
RUN $bazel build //compiler:grpc_java_plugin

WORKDIR /tmp/protobuf-javascript
RUN $bazel build //generator:protoc-gen-js

WORKDIR /tmp
# Install protoc required by envoyproxy/protoc-gen-validate package
RUN cp -a /tmp/grpc/bazel-bin/external/com_google_protobuf/. /usr/local/bin/
Expand Down Expand Up @@ -164,6 +170,8 @@ COPY --from=build /tmp/grpc/bazel-bin/external/com_google_protobuf/ /usr/local/b
COPY --from=build /tmp/grpc/bazel-bin/src/compiler/ /usr/local/bin/
# Copy protoc java plugin
COPY --from=build /tmp/grpc-java/bazel-bin/compiler/ /usr/local/bin/
# Copy protoc js plugin
COPY --from=build /tmp/protobuf-javascript/bazel-bin/generator/protoc-gen-js /usr/local/bin/
# Copy grpc_cli
COPY --from=build /tmp/grpc/bazel-bin/test/cpp/util/ /usr/local/bin/

Expand Down
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ for build in ${BUILDS[@]}; do
--build-arg grpc_web_version="${GRPC_WEB_VERSION}" \
--build-arg grpc_gateway_version="${GRPC_GATEWAY_VERSION}" \
--build-arg go_version="${GO_VERSION}" \
--build-arg protobuf_js_version="${PROTOBUF_JS_VERSION}" \
--build-arg uber_prototool_version="${UBER_PROTOTOOL_VERSION}" \
--build-arg scala_pb_version="${SCALA_PB_VERSION}" \
--build-arg mypy_version="${MYPY_VERSION}" \
Expand Down
3 changes: 2 additions & 1 deletion variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ GRPC_VERSION=${GRPC_VERSION:-1.49}
GRPC_JAVA_VERSION=${GRPC_JAVA_VERSION:-1.49}
GRPC_WEB_VERSION=${GRPC_WEB_VERSION:-1.3.1}
GRPC_GATEWAY_VERSION=${GRPC_GATEWAY_VERSION:-v2.0.1}
PROTOBUF_JS_VERSION=${PROTOBUF_JS_VERSION:-v3.21.0}
UBER_PROTOTOOL_VERSION=${UBER_PROTOTOOL_VERSION:-1.10.0}
SCALA_PB_VERSION=${SCALA_PB_VERSION:-0.11.0}
MYPY_VERSION=${MYPY_VERSION:-3.3.0}
NODE_VERSION=${NODE_VERSION:-14}
NODE_GRPC_TOOLS_NODE_PROTOC_TS_VERSION=${NODE_GRPC_TOOLS_NODE_PROTOC_TS_VERSION:-5.3.2}
NODE_GRPC_TOOLS_VERSION=${NODE_GRPC_TOOLS_VERSION:-1.11.2}
NODE_PROTOC_GEN_GRPC_WEB_VERSION=${NODE_PROTOC_GEN_GRPC_WEB_VERSION:-1.4.0}
TS_PROTO_VERSION=${TS_PROTO_VERSION:1.117.0}
TS_PROTO_VERSION=${TS_PROTO_VERSION:-1.117.0}
GO_ENVOYPROXY_PGV_VERSION=${GO_ENVOYPROXY_PGV_VERSION:-0.6.8}
GO_MWITKOW_GPV_VERSION=${GO_MWITKOW_GPV_VERSION:-0.3.2}
GO_PROTOC_GEN_GO_VERSION=${GO_PROTOC_GEN_GO_VERSION:-v1.28.1}
Expand Down

0 comments on commit 2ef2f89

Please sign in to comment.