build: use rules_cc and use buildifier -lint to enforce it (#11399)

Commit Message:
Partially address #9488. Resurrected #10597.

Additional Description:
Risk Level: Low
Testing: CI
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Lizan Zhou <lizan@tetrate.io>

Mirrored from https://github.com/envoyproxy/envoy @ 67649af8d4881fb7593c728f181eff393f85a638
master-ci-test
data-plane-api(CircleCI) 5 years ago
parent 891fc7e5c6
commit 8f4049b259
  1. 4
      bazel/BUILD
  2. 5
      bazel/api_build_system.bzl
  3. 1
      bazel/repositories.bzl
  4. 4
      envoy/service/auth/v2alpha/BUILD
  5. 4
      test/build/BUILD
  6. 4
      test/validate/BUILD
  7. 2
      tools/BUILD
  8. 4
      versioning/BUILD

@ -1,7 +1,7 @@
licenses(["notice"]) # Apache 2
load("@io_bazel_rules_go//proto:compiler.bzl", "go_proto_compiler")
licenses(["notice"]) # Apache 2
go_proto_compiler(
name = "pgv_plugin_go",
options = ["lang=go"],

@ -1,7 +1,8 @@
load("@rules_cc//cc:defs.bzl", "cc_test")
load("@com_envoyproxy_protoc_gen_validate//bazel:pgv_proto_library.bzl", "pgv_cc_proto_library")
load("@com_github_grpc_grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library")
load("@com_google_protobuf//:protobuf.bzl", _py_proto_library = "py_proto_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_grpc_library", "go_proto_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_test")
load("@rules_proto//proto:defs.bzl", "proto_library")
load(
@ -138,7 +139,7 @@ def api_cc_py_proto_library(
_api_cc_grpc_library(name = cc_grpc_name, proto = relative_name, deps = cc_proto_deps)
def api_cc_test(name, **kwargs):
native.cc_test(
cc_test(
name = name,
**kwargs
)

@ -1,4 +1,3 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load(":envoy_http_archive.bzl", "envoy_http_archive")
load(":repository_locations.bzl", "REPOSITORY_LOCATIONS")

@ -1,9 +1,9 @@
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
# DO NOT EDIT. This file is generated by tools/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
api_proto_package(
has_services = True,
deps = ["//envoy/service/auth/v2:pkg"],

@ -1,7 +1,7 @@
licenses(["notice"]) # Apache 2
load("@envoy_api//bazel:api_build_system.bzl", "api_cc_test", "api_go_test")
licenses(["notice"]) # Apache 2
api_cc_test(
name = "build_test",
srcs = ["build_test.cc"],

@ -1,7 +1,7 @@
licenses(["notice"]) # Apache 2
load("@envoy_api//bazel:api_build_system.bzl", "api_cc_test")
licenses(["notice"]) # Apache 2
api_cc_test(
name = "pgv_test",
srcs = ["pgv_test.cc"],

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_test")
licenses(["notice"]) # Apache 2
py_binary(

@ -1,9 +1,9 @@
# DO NOT EDIT. This file is generated by tools/proto_format/active_protos_gen.py.
licenses(["notice"]) # Apache 2
load("@rules_proto//proto:defs.bzl", "proto_library")
licenses(["notice"]) # Apache 2
# This tracks active development versions of protos.
proto_library(
name = "active_protos",

Loading…
Cancel
Save