api: add go proto generation script (#8155)

Adds a script to create a go module from the generated protobufs as part of #8151.
The module appears to build with the following module declaration:

module github.com/envoyproxy/data-plane-api/api

go 1.12

require (
        github.com/census-instrumentation/opencensus-proto v0.2.1
        github.com/envoyproxy/protoc-gen-validate v0.1.0
        github.com/gogo/protobuf v1.3.0
        github.com/golang/protobuf v1.3.2
        github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4
        google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55
        google.golang.org/grpc v1.23.0
)
Add CI automation to trigger the script after the merge to master in envoyproxy.

Risk Level: low
Testing: local build
Docs Changes: none
Release Notes: none

Fixes #8151

Signed-off-by: Kuat Yessenov <kuat@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ 32e6018f10f9d6de58fd6c3d6844a68a5be7723b
pull/620/head
data-plane-api(CircleCI) 5 years ago
parent 3a907b3394
commit bdef97ce85
  1. 2
      bazel/api_build_system.bzl
  2. 2
      bazel/repositories.bzl
  3. 16
      test/build/go_build_test.go

@ -9,7 +9,7 @@ _CC_SUFFIX = "_cc"
_CC_GRPC_SUFFIX = "_cc_grpc"
_CC_EXPORT_SUFFIX = "_export_cc"
_GO_PROTO_SUFFIX = "_go_proto"
_GO_IMPORTPATH_PREFIX = "github.com/envoyproxy/data-plane-api/api/"
_GO_IMPORTPATH_PREFIX = "github.com/envoyproxy/go-control-plane/"
_COMMON_PROTO_DEPS = [
"@com_google_protobuf//:any_proto",

@ -54,7 +54,7 @@ api_proto_library(
go_proto_library(
name = "client_model_go_proto",
importpath = "client_model",
importpath = "github.com/prometheus/client_model/go",
proto = ":client_model",
visibility = ["//visibility:public"],
)

@ -3,14 +3,14 @@ package go_build_test
import (
"testing"
_ "github.com/envoyproxy/data-plane-api/api/envoy/api/v2"
_ "github.com/envoyproxy/data-plane-api/api/envoy/api/v2/auth"
_ "github.com/envoyproxy/data-plane-api/api/envoy/config/bootstrap/v2"
_ "github.com/envoyproxy/data-plane-api/api/envoy/service/accesslog/v2"
_ "github.com/envoyproxy/data-plane-api/api/envoy/service/discovery/v2"
_ "github.com/envoyproxy/data-plane-api/api/envoy/service/metrics/v2"
_ "github.com/envoyproxy/data-plane-api/api/envoy/service/ratelimit/v2"
_ "github.com/envoyproxy/data-plane-api/api/envoy/service/trace/v2"
_ "github.com/envoyproxy/go-control-plane/envoy/api/v2"
_ "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
_ "github.com/envoyproxy/go-control-plane/envoy/config/bootstrap/v2"
_ "github.com/envoyproxy/go-control-plane/envoy/service/accesslog/v2"
_ "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2"
_ "github.com/envoyproxy/go-control-plane/envoy/service/metrics/v2"
_ "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v2"
_ "github.com/envoyproxy/go-control-plane/envoy/service/trace/v2"
)
func TestNoop(t *testing.T) {

Loading…
Cancel
Save