-
Notifications
You must be signed in to change notification settings - Fork 95
/
WORKSPACE.bzlmod
201 lines (153 loc) · 5.83 KB
/
WORKSPACE.bzlmod
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
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
# In Bazel Central Registry, rules_nodejs before 6.0 is actually rules_nodejs-core,
# which is a trimmed version of build_bazel_rules_nodejs.
#
# Since there is no build_bazel_rules_nodejs in BCR, we still want to load it here.
http_archive(
name = "build_bazel_rules_nodejs",
patch_args = ["-p1"],
patches = [
"//buildpatches:build_bazel_rules_nodejs.patch",
],
sha256 = "a1295b168f183218bc88117cf00674bcd102498f294086ff58318f830dd9d9d1",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.5/rules_nodejs-5.8.5.tar.gz"],
)
load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies")
build_bazel_rules_nodejs_dependencies()
load("@rules_nodejs//nodejs:yarn_repositories.bzl", "yarn_repositories")
yarn_repositories(
name = "yarn",
yarn_version = "1.22.10",
)
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
yarn_install(
name = "npm",
exports_directories_only = False,
package_json = "//:package.json",
symlink_node_modules = False,
yarn_lock = "//:yarn.lock",
)
# Docker
http_archive(
name = "io_bazel_rules_docker",
sha256 = "b1e80761a8a8243d03ebca8845e9cc1ba6c82ce7c5179ce2b295cd36f7e394bf",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.25.0/rules_docker-v0.25.0.tar.gz"],
)
load(
"@io_bazel_rules_docker//toolchains/docker:toolchain.bzl",
docker_toolchain_configure = "toolchain_configure",
)
docker_toolchain_configure(
name = "docker_config",
)
load(
"@io_bazel_rules_docker//repositories:repositories.bzl",
container_repositories = "repositories",
)
container_repositories()
# Kubernetes
http_archive(
name = "io_bazel_rules_k8s",
sha256 = "ce5b9bc0926681e2e7f2147b49096f143e6cbc783e71bc1d4f36ca76b00e6f4a",
strip_prefix = "rules_k8s-0.7",
urls = ["https://github.com/bazelbuild/rules_k8s/archive/refs/tags/v0.7.tar.gz"],
)
load("@io_bazel_rules_k8s//k8s:k8s.bzl", "k8s_defaults", "k8s_repositories")
k8s_repositories()
k8s_defaults(
name = "k8s_deploy",
kind = "deployment",
)
load("@io_bazel_rules_docker//contrib:dockerfile_build.bzl", "dockerfile_image")
dockerfile_image(
name = "default_execution_image",
dockerfile = "//dockerfiles/default_execution_image:Dockerfile",
visibility = ["//visibility:public"],
)
dockerfile_image(
name = "executor_image",
dockerfile = "//dockerfiles/executor_image:Dockerfile",
visibility = ["//visibility:public"],
)
dockerfile_image(
name = "nonroot_user_image",
dockerfile = "//dockerfiles/test_images/nonroot_user_image:Dockerfile",
visibility = ["//visibility:public"],
)
dockerfile_image(
name = "rbe-ubuntu20-04_image",
dockerfile = "//dockerfiles/rbe-ubuntu20-04:Dockerfile",
)
dockerfile_image(
name = "rbe-ubuntu20-04-webtest_image",
dockerfile = "//dockerfiles/rbe-ubuntu20-04-webtest:Dockerfile",
)
dockerfile_image(
name = "rbe-ubuntu22-04_image",
dockerfile = "//dockerfiles/rbe-ubuntu22-04:Dockerfile",
)
dockerfile_image(
name = "ci_runner_image",
dockerfile = "//enterprise/dockerfiles/ci_runner_image:Dockerfile",
visibility = ["//visibility:public"],
)
dockerfile_image(
name = "rbe-ubuntu20-04-workflows_image",
dockerfile = "//enterprise/dockerfiles/rbe-ubuntu20-04-workflows:Dockerfile",
visibility = ["//visibility:public"],
)
dockerfile_image(
name = "run_script_image",
dockerfile = "//dockerfiles/run_script:Dockerfile",
visibility = ["//visibility:public"],
)
load("@io_bazel_rules_docker//container:container.bzl", "container_pull")
container_pull(
name = "buildbuddy_go_image_base",
digest = "sha256:3172df37ef8caa768ce74ebbc7f0e2b6a2641d3b35d18659d36f3815e30fe620",
registry = "gcr.io",
repository = "distroless/cc-debian11",
)
# Base image that can be used to build images that are capable of running the Bazel binary.
container_pull(
name = "bazel_image_base",
digest = "sha256:ab0c5fbe16bc01c03eb081a5724ba618110cbd24940ab123a8dbee0382a4c175",
registry = "gcr.io",
repository = "distroless/java11-debian11",
)
# BuildBuddy Toolchain
# Keep up-to-date with docs/rbe-setup.md and docs/rbe-github-actions.md
http_archive(
name = "io_buildbuddy_buildbuddy_toolchain",
sha256 = "7b9ce903bd0cbf21879c83e264ae9453e143377616935dc1825f7c8c1c2a9688",
strip_prefix = "buildbuddy-toolchain-285db08fc6785f0d051ecdcdf7f2910eb0459641",
urls = ["https://github.com/buildbuddy-io/buildbuddy-toolchain/archive/285db08fc6785f0d051ecdcdf7f2910eb0459641.tar.gz"],
)
load("@io_buildbuddy_buildbuddy_toolchain//:deps.bzl", "buildbuddy_deps")
buildbuddy_deps()
load("@io_buildbuddy_buildbuddy_toolchain//:rules.bzl", "UBUNTU20_04_IMAGE", "buildbuddy")
buildbuddy(
name = "buildbuddy_toolchain",
container_image = UBUNTU20_04_IMAGE,
)
# esbuild (for bundling JS)
load("@build_bazel_rules_nodejs//toolchains/esbuild:esbuild_repositories.bzl", "esbuild_repositories")
esbuild_repositories(npm_repository = "npm")
# Web testing
http_archive(
name = "io_bazel_rules_webtesting",
sha256 = "3e25ac044ed409545214cf8b013fa7255ccf1d2fa027b0d57a3fcc7d732da667",
strip_prefix = "rules_webtesting-9e9361ba887a3b687f537c02409b690b62fecdfe",
urls = [
"https://github.com/bazelbuild/rules_webtesting/archive/9e9361ba887a3b687f537c02409b690b62fecdfe.tar.gz",
],
)
load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
web_test_repositories()
load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.3.bzl", "browser_repositories")
browser_repositories(chromium = True)
load("@io_bazel_rules_webtesting//web:go_repositories.bzl", web_test_go_repositories = "go_repositories")
web_test_go_repositories()
register_toolchains(
"@buildbuddy_toolchain//:ubuntu_cc_toolchain",
)