-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
WORKSPACE
301 lines (255 loc) · 8.37 KB
/
WORKSPACE
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
## Load rules_go and dependencies
http_archive(
name = "io_bazel_rules_go",
urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.16.2/rules_go-0.16.2.tar.gz"],
sha256 = "f87fa87475ea107b3c69196f39c82b7bbf58fe27c62a338684c20ca17d1d8613",
)
load(
"@io_bazel_rules_go//go:def.bzl",
"go_rules_dependencies",
"go_register_toolchains",
)
go_rules_dependencies()
go_register_toolchains(
go_version = "1.11.2",
)
## Load gazelle and dependencies
http_archive(
name = "bazel_gazelle",
url = "https://github.com/bazelbuild/bazel-gazelle/releases/download/0.15.0/bazel-gazelle-0.15.0.tar.gz",
sha256 = "6e875ab4b6bf64a38c352887760f21203ab054676d9c1b274963907e0768740d",
)
load(
"@bazel_gazelle//:deps.bzl",
"gazelle_dependencies",
"go_repository",
)
gazelle_dependencies()
## Load kubernetes repo-infra for tools like kazel
git_repository(
name = "io_kubernetes_build",
commit = "84d52408a061e87d45aebf5a0867246bdf66d180",
remote = "https://github.com/kubernetes/repo-infra.git",
)
## Load rules_docker and depdencies, for working with docker images
git_repository(
name = "io_bazel_rules_docker",
remote = "https://github.com/bazelbuild/rules_docker.git",
tag = "v0.5.1",
)
load(
"@io_bazel_rules_docker//container:container.bzl",
"container_pull",
container_repositories = "repositories",
)
container_repositories()
load(
"@io_bazel_rules_docker//go:image.bzl",
_go_image_repos = "repositories",
)
_go_image_repos()
## Pull some standard base images
container_pull(
name = "alpine",
registry = "gcr.io",
repository = "jetstack-build-infra/alpine",
tag = "3.7-v20180822-0201cfb11",
)
## Fetch helm for use in template generation and testing
new_http_archive(
name = "helm_darwin",
sha256 = "7c4e6bfbc211d6b984ffb4fa490ce9ac112cc4b9b8d859ece27045b8514c1ed1",
urls = ["https://storage.googleapis.com/kubernetes-helm/helm-v2.10.0-darwin-amd64.tar.gz"],
build_file_content =
"""
filegroup(
name = "file",
srcs = [
"darwin-amd64/helm",
],
visibility = ["//visibility:public"],
)
""",
)
new_http_archive(
name = "helm_linux",
sha256 = "0fa2ed4983b1e4a3f90f776d08b88b0c73fd83f305b5b634175cb15e61342ffe",
urls = ["https://storage.googleapis.com/kubernetes-helm/helm-v2.10.0-linux-amd64.tar.gz"],
build_file_content =
"""
filegroup(
name = "file",
srcs = [
"linux-amd64/helm",
],
visibility = ["//visibility:public"],
)
""",
)
## Install 'kind', for creating kubernetes-in-docker clusters
go_repository(
name = "io_kubernetes_sigs_kind",
commit = "e0e26dae2dab662a3d06756ed668f47b2a0515cc",
importpath = "sigs.k8s.io/kind",
)
## Install buildozer, for mass-editing BUILD files
http_file(
name = "buildozer_darwin",
executable = 1,
sha256 = "294357ff92e7bb36c62f964ecb90e935312671f5a41a7a9f2d77d8d0d4bd217d",
urls = ["https://github.com/bazelbuild/buildtools/releases/download/0.15.0/buildozer.osx"],
)
http_file(
name = "buildozer_linux",
executable = 1,
sha256 = "be07a37307759c68696c989058b3446390dd6e8aa6fdca6f44f04ae3c37212c5",
urls = ["https://github.com/bazelbuild/buildtools/releases/download/0.15.0/buildozer"],
)
## Install dep for dependency management
http_file(
name = "dep_darwin",
executable = 1,
sha256 = "1a7bdb0d6c31ecba8b3fd213a1170adf707657123e89dff234871af9e0498be2",
urls = ["https://github.com/golang/dep/releases/download/v0.5.0/dep-darwin-amd64"],
)
http_file(
name = "dep_linux",
executable = 1,
sha256 = "287b08291e14f1fae8ba44374b26a2b12eb941af3497ed0ca649253e21ba2f83",
urls = ["https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64"],
)
## Brodocs and associated dependencies
new_git_repository(
name = "brodocs",
remote = "https://github.com/munnerz/brodocs.git",
# We use this specific revision as it contains changes that allow us to
# specify custom paths when building documentation.
commit = "94937a75f3fd680df04a2cfb06ea7299aad156e9",
build_file_content = """
filegroup(
name = "all-srcs",
srcs = glob(["**/*"]),
visibility = ["//visibility:public"],
)
filegroup(
name = "static",
srcs = [
"stylesheet.css",
"scroll.js",
"actions.js",
"tabvisibility.js",
],
visibility = ["//visibility:public"],
)
""",
)
# Setup npm for brodocs doc generation
git_repository(
name = "build_bazel_rules_nodejs",
remote = "https://github.com/bazelbuild/rules_nodejs.git",
tag = "0.15.0", # check for the latest tag when you install
)
load("@build_bazel_rules_nodejs//:package.bzl", "rules_nodejs_dependencies")
rules_nodejs_dependencies()
load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories")
# TODO: do we need to specify this package.json in node_repositories as well as
# in npm_install?
node_repositories(package_json = ["@brodocs//:package.json"])
load("@build_bazel_rules_nodejs//:defs.bzl", "npm_install")
npm_install(
name = "brodocs_modules",
package_json = "@brodocs//:package.json",
package_lock_json = "//docs/generated/reference/generate/bin:package-lock.json",
)
# Load kubernetes-incubator/reference-docs, to be used as part of the docs
# generation pipeline.
# This involves quite a few dependencies, hence the long list of go_repository
# rules.
# We include them here instead of in Gopkg.{toml,lock} to save extra sources in
# the repository.
# These were all taken from the HEAD of each repositories 'master' branch.
go_repository(
name = "io_kubernetes_incubator_reference_docs",
# Points to HEAD of the 'kubebuilder' branch
commit = "1959039a016c77efe6786b19f3f55f7b3042604f",
importpath = "github.com/kubernetes-incubator/reference-docs",
)
go_repository(
name = "in_gopkg_yaml_v2",
commit = "5420a8b6744d3b0345ab293f6fcba19c978f1183",
remote = "https://github.com/go-yaml/yaml",
vcs = "git",
importpath = "gopkg.in/yaml.v2",
)
go_repository(
name = "com_github_go_openapi_spec",
commit = "f1468acb3b29cdd5c5f6fa29435d2d2d6e6c9ff1",
importpath = "github.com/go-openapi/spec",
)
go_repository(
name = "com_github_go_openapi_loads",
commit = "fd899182a268dcf25de088722375311d9dee2662",
importpath = "github.com/go-openapi/loads",
)
go_repository(
name = "com_github_go_openapi_swag",
commit = "dd0dad036e67ae93c27dc64337b3f76296f3a5f0",
importpath = "github.com/go-openapi/swag",
)
go_repository(
name = "com_github_go_openapi_analysis",
commit = "b006789cd277d4fa4d16767046d694a256c6a218",
importpath = "github.com/go-openapi/analysis",
)
go_repository(
name = "com_github_go_openapi_jsonreference",
commit = "1c6a3fa339f2743b7b0fd2b842fc455eca2fa9eb",
importpath = "github.com/go-openapi/jsonreference",
)
go_repository(
name = "com_github_go_openapi_jsonpointer",
commit = "52eb3d4b47c6a51ce2693c8e614a15a07c1af435",
importpath = "github.com/go-openapi/jsonpointer",
)
go_repository(
name = "com_github_go_openapi_strfmt",
commit = "776114108ccc228238641096ea5be3d24842d4ea",
importpath = "github.com/go-openapi/strfmt",
)
go_repository(
name = "com_github_go_openapi_errors",
commit = "87bb653288778f8b0d922c5c3fb8b3f00a47ff28",
importpath = "github.com/go-openapi/errors",
)
go_repository(
name = "com_github_mailru_easyjson",
commit = "60711f1a8329503b04e1c88535f419d0bb440bff",
importpath = "github.com/mailru/easyjson",
)
go_repository(
name = "com_github_puerkitobio_purell",
commit = "975f53781597ed779763b7b65566e74c4004d8de",
importpath = "github.com/PuerkitoBio/purell",
)
go_repository(
name = "com_github_puerkitobio_urlesc",
commit = "de5bf2ad457846296e2031421a34e2568e304e35",
importpath = "github.com/PuerkitoBio/urlesc",
)
go_repository(
name = "com_github_globalsign_mgo",
commit = "1ca0a4f7cbcbe61c005d1bd43fdd8bb8b71df6bc",
importpath = "github.com/globalsign/mgo",
)
go_repository(
name = "com_github_mitchellh_mapstructure",
commit = "fa473d140ef3c6adf42d6b391fe76707f1f243c8",
importpath = "github.com/mitchellh/mapstructure",
)
go_repository(
name = "com_github_asaskevich_govalidator",
commit = "f9ffefc3facfbe0caee3fea233cbb6e8208f4541",
importpath = "github.com/asaskevich/govalidator",
)