-
-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathWORKSPACE
More file actions
157 lines (122 loc) · 5.12 KB
/
Copy pathWORKSPACE
File metadata and controls
157 lines (122 loc) · 5.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
workspace(name = "cilium")
ENVOY_PROJECT = "envoyproxy"
ENVOY_REPO = "envoy"
# Envoy GIT commit SHA of release
#
# We grep for the following line to generate SOURCE_VERSION file for non-git
# distribution builds. This line must start with the string ENVOY_SHA followed by
# an equals sign and a git SHA in double quotes.
#
# No other line in this file may have ENVOY_SHA followed by an equals sign!
#
# renovate: datasource=github-releases depName=envoyproxy/envoy digestVersion=v1.38.3
ENVOY_SHA = "0ebfcfe5b0484b89ca85b761da9e05ce75dbda8d"
# // clang-format off: unexpected @bazel_tools reference, please indirect via a definition in //bazel
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
# // clang-format on
local_repository(
name = "envoy_build_config",
path = "envoy_build_config",
)
# This is a local repository for local development instead of git repository for faster feedback loop
#local_repository(
# name = "envoy",
# # Update the path to point to your local Envoy repository.
# path = "/home/tammach/go/src/github.com/envoyproxy/envoy",
#)
git_repository(
name = "envoy",
commit = ENVOY_SHA,
patch_args = ["apply"],
patch_tool = "git",
patches = [
"@//patches:0001-network-Add-callback-for-upstream-authorization.patch",
"@//patches:0002-listener-add-socket-options.patch",
"@//patches:0003-original_dst_cluster-Avoid-multiple-hosts-for-the-sa.patch",
"@//patches:0004-thread_local-reset-slot-in-worker-threads-first.patch",
"@//patches:0005-http-header-expose-attribute.patch",
"@//patches:0006-test-integration-Defer-fake-upstream-read-enable-un.patch",
"@//patches:0007-config-add-grpc-mux-stream-event-callback.patch",
"@//patches:0008-repo-Make-yq-dependency-optional-for-CI-config-parsi.patch",
],
# // clang-format off: Envoy's format check: Only repository_locations.bzl may contains URL references
remote = "https://github.com/envoyproxy/envoy.git",
# // clang-format on
)
#
# Bazel does not do transitive dependencies, so we must basically
# include all of Envoy's WORKSPACE file below, with the following
# changes:
# - Skip the 'workspace(name = "envoy")' line as we already defined
# the workspace above.
# - loads of "//..." need to be renamed as "@envoy//..."
#
load("@envoy//bazel:api_binding.bzl", "envoy_api_binding")
envoy_api_binding()
load("@envoy//bazel:api_repositories.bzl", "envoy_api_dependencies")
envoy_api_dependencies()
load("@envoy//bazel:repositories.bzl", "envoy_dependencies")
envoy_dependencies()
load("@envoy//bazel:bazel_deps.bzl", "envoy_bazel_dependencies")
envoy_bazel_dependencies()
load("@envoy//bazel:repositories_extra.bzl", "envoy_dependencies_extra")
envoy_dependencies_extra()
load("@envoy//bazel:python_dependencies.bzl", "envoy_python_dependencies")
envoy_python_dependencies()
load("@bazel_gazelle//:deps.bzl", "go_repository")
load("@envoy//bazel:dependency_imports.bzl", "envoy_dependency_imports")
go_repository(
name = "org_golang_x_text",
build_external = "external",
importpath = "golang.org/x/text",
sum = "h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE=",
version = "v0.33.0",
)
go_repository(
name = "org_golang_x_tools",
build_external = "external",
importpath = "golang.org/x/tools",
sum = "h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc=",
version = "v0.41.0",
)
go_repository(
name = "org_golang_x_net",
build_external = "external",
importpath = "golang.org/x/net",
sum = "h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o=",
version = "v0.49.0",
)
go_repository(
name = "org_golang_x_sys",
build_external = "external",
importpath = "golang.org/x/sys",
sum = "h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo=",
version = "v0.42.0",
)
go_repository(
name = "org_golang_x_mod",
build_external = "external",
importpath = "golang.org/x/mod",
sum = "h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c=",
version = "v0.32.0",
)
# rules_rust hashes the crate manifest label into the crate_universe lockfile, so
# Envoy's own Cargo.Bazel.lock never matches when Envoy is embedded as @envoy.
# Point the crate index at a Cilium-owned lockfile instead. Refresh it with
# `make cargo-repin` whenever Envoy changes its Rust dependencies.
envoy_dependency_imports(
cargo_bazel_lockfile = "@//bazel:envoy_dynamic_modules_rust_sdk.Cargo.Bazel.lock",
)
load("@envoy//bazel:repo.bzl", "envoy_repo")
envoy_repo()
# Pre-create @llvm_toolchain_llvm from the local LLVM (BAZEL_LLVM_PATH) BEFORE
# envoy_toolchains(). envoy_toolchains() (and toolchains_llvm's llvm_toolchain())
# only create @llvm_toolchain_llvm when it does not already exist, and the repo
# envoy would create lacks the //:clang-format target that the format check needs.
# Providing a complete repo here makes both compilation and the format check work.
load("//bazel:local_llvm.bzl", "local_llvm_repo")
local_llvm_repo(name = "llvm_toolchain_llvm")
load("@envoy//bazel:toolchains.bzl", "envoy_toolchains")
envoy_toolchains()
load("@envoy//bazel:dependency_imports_extra.bzl", "envoy_dependency_imports_extra")
envoy_dependency_imports_extra()