Skip to content

Commit

Permalink
bazel/tooling: Use toolshed json_data macro (#29790)
Browse files Browse the repository at this point in the history
As this is used in the api as well as Envoy itself the dep has
been moved there.

Signed-off-by: phlax <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
  • Loading branch information
phlax committed Oct 3, 2023
1 parent 79f97ce commit a85672d
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion api/bazel/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@envoy_toolshed//:macros.bzl", "json_data")
load("@io_bazel_rules_go//proto:compiler.bzl", "go_proto_compiler")
load(":utils.bzl", "json_data")
load(":repository_locations.bzl", "REPOSITORY_LOCATIONS_SPEC")
load(":repository_locations_utils.bzl", "load_repository_locations_spec")
load(
Expand Down
4 changes: 4 additions & 0 deletions api/bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ def api_dependencies():
name = "com_github_chrusty_protoc_gen_jsonschema",
)

external_http_archive(
name = "envoy_toolshed",
)

PROMETHEUSMETRICS_BUILD_CONTENT = """
load("@envoy_api//bazel:api_build_system.bzl", "api_cc_py_proto_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
Expand Down
14 changes: 14 additions & 0 deletions api/bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,18 @@ REPOSITORY_LOCATIONS_SPEC = dict(
use_category = ["build"],
release_date = "2023-05-30",
),
envoy_toolshed = dict(
project_name = "envoy_toolshed",
project_desc = "Tooling, libraries, runners and checkers for Envoy proxy's CI",
project_url = "https://github.com/envoyproxy/toolshed",
version = "0.0.6",
sha256 = "7047db983e49290ac14b2733459d439a8a521ff49e95fbd0b185a692bd6a6d86",
strip_prefix = "toolshed-bazel-v{version}/bazel",
urls = ["https://github.com/envoyproxy/toolshed/archive/refs/tags/bazel-v{version}.tar.gz"],
use_category = ["build"],
release_date = "2023-09-24",
cpe = "N/A",
license = "Apache-2.0",
license_url = "https://github.com/envoyproxy/envoy/blob/bazel-v{version}/LICENSE",
),
)
18 changes: 0 additions & 18 deletions api/bazel/utils.bzl

This file was deleted.

2 changes: 1 addition & 1 deletion bazel/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("//bazel:envoy_build_system.bzl", "envoy_package")
load("//bazel:envoy_internal.bzl", "envoy_select_force_libcpp")
load("@envoy_api//bazel:utils.bzl", "json_data")
load("@envoy_toolshed//:macros.bzl", "json_data")
load("@bazel_skylib//lib:selects.bzl", "selects")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load(":repository_locations.bzl", "REPOSITORY_LOCATIONS_SPEC")
Expand Down
1 change: 0 additions & 1 deletion bazel/api_binding.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def _default_envoy_api_impl(ctx):
]
for d in api_dirs:
ctx.symlink(ctx.path(ctx.attr.envoy_root).dirname.get_child(ctx.attr.reldir).get_child(d), d)
ctx.symlink(ctx.path(ctx.attr.envoy_root).dirname.get_child("api").get_child("bazel").get_child("utils.bzl"), "utils.bzl")

_default_envoy_api = repository_rule(
implementation = _default_envoy_api_impl,
Expand Down
2 changes: 1 addition & 1 deletion contrib/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@envoy_api//bazel:utils.bzl", "json_data")
load("@envoy_toolshed//:macros.bzl", "json_data")
load(":contrib_build_config.bzl", "CONTRIB_EXTENSIONS")

licenses(["notice"]) # Apache 2
Expand Down
2 changes: 1 addition & 1 deletion source/extensions/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@envoy_api//bazel:utils.bzl", "json_data")
load("@envoy_toolshed//:macros.bzl", "json_data")
load("//bazel:envoy_build_system.bzl", "envoy_extension_package")
load(":all_extensions.bzl", "envoy_all_extensions")
load(":extensions_build_config.bzl", "EXTENSIONS")
Expand Down

0 comments on commit a85672d

Please sign in to comment.