Commit aa472720 authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Update 'grpc-gateway' and 'genproto' dependencies.

parent e8880623
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -206,6 +206,9 @@
    "jsonpb",
    "proto",
    "protoc-gen-go/descriptor",
    "protoc-gen-go/generator",
    "protoc-gen-go/generator/internal/remap",
    "protoc-gen-go/plugin",
    "ptypes",
    "ptypes/any",
    "ptypes/duration",
@@ -273,7 +276,7 @@
  revision = "95ba29eb981bbb27d92e1f70bf8a1949452d926b"

[[projects]]
  digest = "1:b563eec078077ba5cedc795462cbd6d7c75a106a4d2e3d02940093c80e28de28"
  digest = "1:67fa7fe174716264688b0d1c69ee4bfa75191d311ff8080f4b06caffbcc17ba6"
  name = "github.com/grpc-ecosystem/grpc-gateway"
  packages = [
    "protoc-gen-swagger/options",
@@ -282,8 +285,8 @@
    "utilities",
  ]
  pruneopts = ""
  revision = "92583770e3f01b09a0d3e9bdf64321d8bebd48f2"
  version = "v1.4.1"
  revision = "719aaadb1a4f7b11606d454e266fe5c5f789796f"
  version = "v1.6.3"

[[projects]]
  digest = "1:7df5a9695a743c3e1626b28bb8741602c8c15527e1efaeaec48ab2ff9a23f74c"
@@ -637,8 +640,7 @@
  version = "v1.1.0"

[[projects]]
  branch = "master"
  digest = "1:6b740cfb473f7a3a1a5de40e48be84a3890a85832f51a647cca9e1deb00cf8d7"
  digest = "1:8c7bf8f974d0b63a83834e83b6dd39c2b40d61d409d76172c81d67eba8fee4a8"
  name = "google.golang.org/genproto"
  packages = [
    "googleapis/api/annotations",
@@ -652,7 +654,7 @@
    "protobuf/field_mask",
  ]
  pruneopts = ""
  revision = "02b4e95473316948020af0b7a4f0f22c73929b0e"
  revision = "bd9b4fb69e2ffd37621a6caa54dcbead29b546f2"

[[projects]]
  digest = "1:d141efe4aaad714e3059c340901aab3147b6253e58c85dafbcca3dd8b0e88ad6"
+9 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
  name = "go.uber.org/zap"
  version = "~1.9.1"

[[constraint]]
[[override]]
  name = "github.com/golang/protobuf"
  version = "~1.2.0"

@@ -10,6 +10,14 @@
  name = "google.golang.org/grpc"
  version = "~1.17.0"

[[constraint]]
  name = "github.com/grpc-ecosystem/grpc-gateway"
  version = "~1.6.3"

[[override]]
  name = "google.golang.org/genproto"
  revision = "bd9b4fb69e2ffd37621a6caa54dcbead29b546f2"

[[constraint]]
  name = "github.com/go-yaml/yaml"
  revision = "51d6538a90f86fe93ac480b35f37b2be17fef232"
+36 −0
Original line number Diff line number Diff line
FROM golang:latest

## Warm apt cache
RUN apt-get update

# Install swagger-codegen
ENV SWAGGER_CODEGEN_VERSION=2.2.2
RUN apt-get install -y openjdk-8-jre wget && \
    wget http://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/${SWAGGER_CODEGEN_VERSION}/swagger-codegen-cli-${SWAGGER_CODEGEN_VERSION}.jar \
    -O /usr/local/bin/swagger-codegen-cli.jar && \
    apt-get remove -y wget
ENV SWAGGER_CODEGEN="java -jar /usr/local/bin/swagger-codegen-cli.jar"

# Install protoc
ENV PROTOC_VERSION=3.1.0
RUN apt-get install -y wget unzip && \
    wget https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip \
    -O /protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
    unzip /protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local/ && \
    rm -f /protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
    apt-get remove -y unzip wget

# Install node
ENV NODE_VERSION=v6.1
RUN apt-get install -y wget bzip2 && \
    wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash && \
    apt-get remove -y wget

# Install dep
RUN apt-get install -y wget && \
    wget -qO- https://raw.githubusercontent.com/golang/dep/master/install.sh | sh && \
    apt-get remove -y wget

# Clean up
RUN apt-get autoremove -y && \
    rm -rf /var/lib/apt/lists/*
+22 −0
Original line number Diff line number Diff line
## gRPC-Gateway CI testing setup

Contained within is the CI test setup for the Gateway. It runs on Circle CI.

### I want to regenerate the files after making changes!

Great, it should be as simple as thus (run from the root of the directory):

```bash
$ docker run -v $(pwd):/go/src/github.com/grpc-ecosystem/grpc-gateway --rm jfbrandhorst/grpc-gateway-build-env \
    /bin/bash -c 'cd /go/src/github.com/grpc-ecosystem/grpc-gateway && \
        make realclean && \
        make examples SWAGGER_CODEGEN="${SWAGGER_CODEGEN}"'
```

If this has resulted in some file changes in the repo, please ensure you check those in with your merge request.

### Whats up with the Dockerfile?

The `Dockerfile` in this folder is used as the build environment when regenerating the files (see above).
The canonical repository for this Dockerfile is `jfbrandhorst/grpc-gateway-build-env`. Please request access
before attempting to make any changes to the Dockerfile.
+102 −0
Original line number Diff line number Diff line
version: 2
jobs:
  build:
    docker:
      - image: jfbrandhorst/grpc-gateway-build-env
    working_directory: /go/src/github.com/grpc-ecosystem/grpc-gateway
    steps:
      - checkout
      - run: dep ensure --vendor-only
      - run: go build ./...
  test:
    docker:
      - image: jfbrandhorst/grpc-gateway-build-env
    working_directory: /go/src/github.com/grpc-ecosystem/grpc-gateway
    environment:
      GLOG_logtostderr: "1"
    steps:
      - checkout
      - run: dep ensure --vendor-only
      - run: go test -race -coverprofile=coverage.txt ./...
      - run: bash <(curl -s https://codecov.io/bash)
  node_test:
    docker:
      - image: jfbrandhorst/grpc-gateway-build-env
    working_directory: /go/src/github.com/grpc-ecosystem/grpc-gateway
    steps:
      - checkout
      - run: dep ensure --vendor-only
      - run: >
          . $HOME/.nvm/nvm.sh &&
          cd examples/browser &&
          npm install gulp-cli &&
          npm install &&
          ./node_modules/.bin/gulp
  generate:
    docker:
      - image: jfbrandhorst/grpc-gateway-build-env
    working_directory: /go/src/github.com/grpc-ecosystem/grpc-gateway
    steps:
      - checkout
      - run: make realclean
      - run: make examples SWAGGER_CODEGEN="${SWAGGER_CODEGEN}" # Set in Docker image
      - run: git diff --exit-code
  lint:
    docker:
      - image: jfbrandhorst/grpc-gateway-build-env
    working_directory: /go/src/github.com/grpc-ecosystem/grpc-gateway
    steps:
      - checkout
      - run: dep ensure --vendor-only
      - run: go get golang.org/x/lint/golint
      - run: make lint
  bazel:
    docker:
      - image: l.gcr.io/google/bazel:latest
    working_directory: /go/src/github.com/grpc-ecosystem/grpc-gateway
    steps:
      - checkout
      - run:
          name: Create Bazel config file (.bazelrc)
          command: |
            cat > .bazelrc << EOF
            startup --output_base $HOME/.cache/_grpc_gateway_bazel
            build --test_output errors
            build --features race
            EOF
      - run:
          name: Check that Bazel BUILD files are up-to-date
          command: 'test -z "$(bazel run //:gazelle_diff)" ||
          (echo "ERROR: Bazel files out-of-date, please run \`bazel run :gazelle_fix\`" >&2; exit 1)'
      - run:
          name: Run tests with Bazel
          command: bazel test //...
      - run:
          name: Check formatting of Bazel BUILD files
          command: 'bazel run //:buildifier_check ||
          (echo "ERROR: Bazel files not formatted, please run \`bazel run :buildifier\`" >&2; exit 1)'
          when: always
  release:
    docker:
      - image: jfbrandhorst/grpc-gateway-build-env
    working_directory: /go/src/github.com/grpc-ecosystem/grpc-gateway
    steps:
      - checkout
      - run: dep ensure --vendor-only
      - run: curl -sL https://git.io/goreleaser | bash
workflows:
  version: 2
  all:
    jobs:
      - build
      - test
      - node_test
      - generate
      - lint
      - bazel
      - release:
          filters:
            branches:
              ignore: /.*/
            tags:
              only: /v[0-9]+(\.[0-9]+)*(-.*)*/
Loading