Skip to content

Commit

Permalink
anchoring envoy validator version to fix build (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
ido-namely authored Oct 13, 2021
1 parent 360bf40 commit daeb3e3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ARG node_version
ARG node_grpc_tools_node_protoc_ts_version
ARG node_grpc_tools_version
ARG node_protoc_gen_grpc_web_version
ARG go_envoyproxy_pgv_version

FROM golang:$go_version-$debian AS build

Expand All @@ -18,6 +19,7 @@ ARG grpc_gateway_version
ARG grpc_java_version
ARG grpc_web_version
ARG scala_pb_version
ARG go_envoyproxy_pgv_version

RUN set -ex && apt-get update && apt-get install -y --no-install-recommends \
build-essential \
Expand Down Expand Up @@ -89,8 +91,8 @@ RUN go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc

RUN go get -u github.com/micro/micro/cmd/protoc-gen-micro

RUN go get -d github.com/envoyproxy/protoc-gen-validate
RUN make -C /go/src/github.com/envoyproxy/protoc-gen-validate/ build
RUN GO111MODULE=on go get -d github.com/envoyproxy/protoc-gen-validate@v${go_envoyproxy_pgv_version}
RUN make -C /go/pkg/mod/github.com/envoyproxy/protoc-gen-validate@v${go_envoyproxy_pgv_version}/ build

RUN go get -u github.com/mwitkow/go-proto-validators/protoc-gen-govalidators

Expand Down Expand Up @@ -122,6 +124,8 @@ ARG node_grpc_tools_node_protoc_ts_version
ARG node_grpc_tools_version
ARG node_protoc_gen_grpc_web_version

ARG go_envoyproxy_pgv_version

RUN mkdir -p /usr/share/man/man1
RUN set -ex && apt-get update && apt-get install -y --no-install-recommends \
bash \
Expand Down Expand Up @@ -164,7 +168,7 @@ COPY --from=build /tmp/protoc-gen-scala /usr/local/bin/

COPY --from=build /go/pkg/mod/github.com/grpc-ecosystem/grpc-gateway/v2@v${grpc_gateway_version}/protoc-gen-openapiv2/options /opt/include/protoc-gen-openapiv2/options/

COPY --from=build /go/src/github.com/envoyproxy/protoc-gen-validate/ /opt/include/
COPY --from=build /go/pkg/mod/github.com/envoyproxy/protoc-gen-validate@v${go_envoyproxy_pgv_version}/ /opt/include/
COPY --from=build /go/src/github.com/mwitkow/go-proto-validators/ /opt/include/github.com/mwitkow/go-proto-validators/

ADD all/entrypoint.sh /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 @@ -18,6 +18,7 @@ for build in ${BUILDS[@]}; do
--build-arg node_grpc_tools_node_protoc_ts_version=${NODE_GRPC_TOOLS_NODE_PROTOC_TS_VERSION} \
--build-arg node_grpc_tools_version=${NODE_GRPC_TOOLS_VERSION} \
--build-arg node_protoc_gen_grpc_web_version=${NODE_PROTOC_GET_GRPC_WEB_VERSION} \
--build-arg go_envoyproxy_pgv_version=${GO_ENVOYPROXY_PGV_VERSION} \
--target ${build} \
.

Expand Down
1 change: 1 addition & 0 deletions variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ NODE_VERSION=${NODE_VERSION:-14}
NODE_GRPC_TOOLS_NODE_PROTOC_TS_VERSION=${NODE_GRPC_TOOLS_NODE_PROTOC_TS_VERSION:-5.1.3}
NODE_GRPC_TOOLS_VERSION=${NODE_GRPC_TOOLS_VERSION:-1.11.1}
NODE_PROTOC_GET_GRPC_WEB_VERSION=${NODE_PROTOC_GET_GRPC_WEB_VERSION:-1.2.1}
GO_ENVOYPROXY_PGV_VERSION=${GO_ENVOYPROXY_PGV_VERSION:-0.6.1}
BUILD_VERSION="${BUILD_VERSION:-local}"
VERSION="${VERSION:-${GRPC_VERSION}_${BUILD_VERSION}}"

0 comments on commit daeb3e3

Please sign in to comment.