2019-09-22 00:19:18 +00:00
|
|
|
workspace(
|
|
|
|
name = "hscloud",
|
|
|
|
)
|
|
|
|
|
2019-01-13 20:14:02 +00:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
2021-03-18 19:15:38 +00:00
|
|
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
|
2019-01-13 20:14:02 +00:00
|
|
|
|
2023-07-28 17:14:50 +00:00
|
|
|
# Load skylib
|
|
|
|
http_archive(
|
|
|
|
name = "bazel_skylib",
|
|
|
|
sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506",
|
|
|
|
urls = [
|
|
|
|
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
|
|
|
|
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
|
|
|
|
|
|
|
|
bazel_skylib_workspace()
|
|
|
|
|
|
|
|
load("@bazel_skylib//lib:versions.bzl", "versions")
|
|
|
|
|
|
|
|
versions.check(minimum_bazel_version = "5.4.1")
|
|
|
|
|
2020-07-03 05:05:15 +00:00
|
|
|
# Protobuf deps (shared between many rules).
|
|
|
|
# Load this as early as possible, to avoid a different version being pulled in by deps of something else
|
|
|
|
http_archive(
|
|
|
|
name = "com_google_protobuf",
|
2023-07-28 17:14:50 +00:00
|
|
|
sha256 = "76a33e2136f23971ce46c72fd697cd94dc9f73d56ab23b753c3e16854c90ddfd",
|
|
|
|
strip_prefix = "protobuf-2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a",
|
|
|
|
urls = [
|
|
|
|
"https://github.com/protocolbuffers/protobuf/archive/2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a.tar.gz",
|
|
|
|
],
|
2020-07-03 05:05:15 +00:00
|
|
|
)
|
|
|
|
|
2023-07-28 17:14:50 +00:00
|
|
|
http_archive(
|
|
|
|
name = "rules_proto",
|
|
|
|
sha256 = "dc3fb206a2cb3441b485eb1e423165b231235a1ea9b031b4433cf7bc1fa460dd",
|
|
|
|
strip_prefix = "rules_proto-5.3.0-21.7",
|
|
|
|
urls = [
|
|
|
|
"https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.7.tar.gz",
|
|
|
|
],
|
|
|
|
)
|
2020-12-03 22:19:28 +00:00
|
|
|
|
2023-07-28 17:14:50 +00:00
|
|
|
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
|
|
|
|
|
|
|
|
rules_proto_dependencies()
|
|
|
|
|
|
|
|
rules_proto_toolchains()
|
|
|
|
|
|
|
|
rules_python_version = "0.24.0"
|
2020-07-03 05:05:15 +00:00
|
|
|
|
2020-09-25 20:24:17 +00:00
|
|
|
http_archive(
|
|
|
|
name = "rules_python",
|
2023-07-28 17:14:50 +00:00
|
|
|
sha256 = "0a8003b044294d7840ac7d9d73eef05d6ceb682d7516781a4ec62eeb34702578",
|
2021-06-26 12:51:15 +00:00
|
|
|
strip_prefix = "rules_python-{}".format(rules_python_version),
|
2022-06-18 21:56:22 +00:00
|
|
|
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/{}.tar.gz".format(rules_python_version),
|
2020-09-25 20:24:17 +00:00
|
|
|
)
|
2020-06-05 21:37:34 +00:00
|
|
|
|
2020-09-25 20:24:17 +00:00
|
|
|
# Download Go/Gazelle rules
|
2020-06-05 21:37:34 +00:00
|
|
|
http_archive(
|
|
|
|
name = "io_bazel_rules_go",
|
2023-07-28 17:14:50 +00:00
|
|
|
sha256 = "51dc53293afe317d2696d4d6433a4c33feedb7748a9e352072e2ec3c0dafd2c6",
|
2020-06-05 21:37:34 +00:00
|
|
|
urls = [
|
2023-07-28 17:14:50 +00:00
|
|
|
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.40.1/rules_go-v0.40.1.zip",
|
|
|
|
"https://github.com/bazelbuild/rules_go/releases/download/v0.40.1/rules_go-v0.40.1.zip",
|
2020-06-05 21:37:34 +00:00
|
|
|
],
|
|
|
|
)
|
2020-12-03 22:19:28 +00:00
|
|
|
|
2020-06-05 21:37:34 +00:00
|
|
|
http_archive(
|
|
|
|
name = "bazel_gazelle",
|
2023-07-28 17:14:50 +00:00
|
|
|
sha256 = "29d5dafc2a5582995488c6735115d1d366fcd6a0fc2e2a153f02988706349825",
|
2022-11-26 20:33:38 +00:00
|
|
|
urls = [
|
2023-07-28 17:14:50 +00:00
|
|
|
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.31.0/bazel-gazelle-v0.31.0.tar.gz",
|
|
|
|
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.31.0/bazel-gazelle-v0.31.0.tar.gz",
|
2022-11-26 20:33:38 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2023-07-28 17:14:50 +00:00
|
|
|
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
|
|
|
|
load("//third_party/go:repositories.bzl", "go_repositories")
|
2022-11-26 20:33:38 +00:00
|
|
|
|
2020-07-03 05:05:15 +00:00
|
|
|
# Python rules
|
2023-02-04 22:57:59 +00:00
|
|
|
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
|
|
|
|
|
|
|
|
python_register_toolchains(
|
|
|
|
name = "python3_10",
|
|
|
|
python_version = "3.10",
|
|
|
|
)
|
|
|
|
|
|
|
|
load("@python3_10//:defs.bzl", "interpreter")
|
2021-06-29 19:16:45 +00:00
|
|
|
load("@rules_python//python:pip.bzl", "pip_parse")
|
2021-07-11 12:32:36 +00:00
|
|
|
|
2021-06-29 19:16:45 +00:00
|
|
|
pip_parse(
|
2020-12-03 22:19:28 +00:00
|
|
|
name = "pydeps",
|
2023-02-04 22:57:59 +00:00
|
|
|
python_interpreter_target = interpreter,
|
2021-06-29 19:16:45 +00:00
|
|
|
requirements_lock = "//third_party/py:requirements.txt",
|
2020-07-03 05:05:15 +00:00
|
|
|
)
|
2021-07-11 12:32:36 +00:00
|
|
|
|
2021-06-29 19:16:45 +00:00
|
|
|
load("@pydeps//:requirements.bzl", "install_deps")
|
2023-07-28 17:14:50 +00:00
|
|
|
|
2021-06-29 19:16:45 +00:00
|
|
|
install_deps()
|
2020-07-03 05:05:15 +00:00
|
|
|
|
2020-09-25 20:24:17 +00:00
|
|
|
# Setup Go toolchain.
|
2021-07-11 12:32:36 +00:00
|
|
|
|
2023-07-28 17:14:50 +00:00
|
|
|
# gazelle:repository_macro third_party/go/repositories.bzl%go_repositories
|
|
|
|
# gazelle:repository go_repository name=hscloud importpath=code.hackerspace.pl/hscloud
|
|
|
|
go_repositories()
|
|
|
|
|
|
|
|
load("@bazel_gazelle//:deps.bzl", "go_repository")
|
|
|
|
|
|
|
|
go_repository(
|
|
|
|
name = "org_golang_x_mod",
|
|
|
|
build_external = "external",
|
|
|
|
importpath = "golang.org/x/mod",
|
|
|
|
sum = "h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=",
|
|
|
|
version = "v0.10.0",
|
|
|
|
)
|
|
|
|
|
|
|
|
go_rules_dependencies()
|
|
|
|
|
|
|
|
go_register_toolchains(go_version = "1.20.5")
|
2020-09-25 20:24:17 +00:00
|
|
|
|
2020-07-03 05:05:15 +00:00
|
|
|
http_archive(
|
|
|
|
name = "com_github_grpc_grpc",
|
2023-07-28 17:14:50 +00:00
|
|
|
patch_args = ["-p1"],
|
|
|
|
patches = [
|
|
|
|
"//third_party:grpc_extra_deps.patch",
|
|
|
|
],
|
|
|
|
sha256 = "931f07db9d48cff6a6007c1033ba6d691fe655bea2765444bc1ad974dfc840aa",
|
|
|
|
strip_prefix = "grpc-1.56.2",
|
|
|
|
urls = ["https://github.com/grpc/grpc/archive/v1.56.2.tar.gz"],
|
2020-07-03 05:05:15 +00:00
|
|
|
)
|
|
|
|
|
2020-09-25 20:24:17 +00:00
|
|
|
# Load grpc deps after Go, to prevent overriding Go toolchains/SDK.
|
2020-07-03 05:05:15 +00:00
|
|
|
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
|
2020-12-03 22:19:28 +00:00
|
|
|
|
2020-07-03 05:05:15 +00:00
|
|
|
grpc_deps()
|
2020-12-03 22:19:28 +00:00
|
|
|
|
2020-07-03 05:05:15 +00:00
|
|
|
load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")
|
2020-12-03 22:19:28 +00:00
|
|
|
|
2020-07-03 05:05:15 +00:00
|
|
|
grpc_extra_deps()
|
2020-06-05 21:37:34 +00:00
|
|
|
|
2023-07-28 17:14:50 +00:00
|
|
|
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
|
2021-10-07 18:45:20 +00:00
|
|
|
|
2020-06-05 21:37:34 +00:00
|
|
|
gazelle_dependencies()
|
|
|
|
|
2019-07-14 14:29:52 +00:00
|
|
|
# Docker rules
|
|
|
|
|
|
|
|
http_archive(
|
|
|
|
name = "io_bazel_rules_docker",
|
2023-07-28 17:14:50 +00:00
|
|
|
sha256 = "b1e80761a8a8243d03ebca8845e9cc1ba6c82ce7c5179ce2b295cd36f7e394bf",
|
|
|
|
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.25.0/rules_docker-v0.25.0.tar.gz"],
|
2019-07-14 14:29:52 +00:00
|
|
|
)
|
|
|
|
|
2019-07-21 21:56:43 +00:00
|
|
|
load("@io_bazel_rules_docker//toolchains/docker:toolchain.bzl", docker_toolchain_configure = "toolchain_configure")
|
|
|
|
|
2019-07-14 14:29:52 +00:00
|
|
|
load(
|
|
|
|
"@io_bazel_rules_docker//repositories:repositories.bzl",
|
|
|
|
container_repositories = "repositories",
|
|
|
|
)
|
2020-12-03 22:19:28 +00:00
|
|
|
|
2019-07-14 14:29:52 +00:00
|
|
|
container_repositories()
|
2019-07-21 21:50:05 +00:00
|
|
|
|
2023-02-04 22:47:44 +00:00
|
|
|
load(
|
|
|
|
"@io_bazel_rules_docker//python3:image.bzl",
|
|
|
|
_py_image_repos = "repositories",
|
|
|
|
)
|
|
|
|
|
|
|
|
_py_image_repos()
|
|
|
|
|
2019-05-18 14:23:45 +00:00
|
|
|
# Docker base images
|
|
|
|
|
|
|
|
load("@io_bazel_rules_docker//container:container.bzl", "container_pull")
|
2019-06-21 18:38:35 +00:00
|
|
|
|
2023-02-04 22:47:44 +00:00
|
|
|
container_pull(
|
|
|
|
name = "python-debian",
|
|
|
|
digest = "sha256:cfa3b79333c4e56fc675b6800445b6dcbb3e6cd4d52f2a9ade944ab73dadc6a1",
|
|
|
|
registry = "index.docker.io",
|
|
|
|
repository = "python",
|
|
|
|
tag = "3.10-bullseye", # use the same version as in python_register_toolchains
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2019-05-18 14:23:45 +00:00
|
|
|
container_pull(
|
|
|
|
name = "prodimage-bionic",
|
2021-10-07 18:45:20 +00:00
|
|
|
digest = "sha256:1cd1f84169b8e1414a5d511b42909f2d540831c67b6799ae9af8cd6a80d75b5f",
|
2019-07-30 11:07:04 +00:00
|
|
|
registry = "registry.k0.hswaw.net",
|
|
|
|
repository = "q3k/prodimage",
|
2019-08-22 16:13:13 +00:00
|
|
|
tag = "20190822-1227",
|
2019-05-18 14:23:45 +00:00
|
|
|
)
|
|
|
|
|
2021-12-26 10:26:42 +00:00
|
|
|
container_pull(
|
|
|
|
name = "prodimage-focal",
|
|
|
|
digest = "sha256:fb6159a3ddf2f783092f1169792d1fba6f108714026ad2aa08204e8356825a13",
|
|
|
|
registry = "registry.k0.hswaw.net",
|
|
|
|
repository = "q3k/prodimage-focal",
|
|
|
|
tag = "20211214-0108",
|
|
|
|
)
|
|
|
|
|
2019-06-21 18:38:35 +00:00
|
|
|
container_pull(
|
2023-10-08 12:27:44 +00:00
|
|
|
name = "gerrit-3.7.5",
|
|
|
|
digest = "sha256:3705f3cb365bf53a8e310dd7e09c8fb44a073e1266dc0e713b6fdc04c91ab9f2",
|
2019-06-21 18:38:35 +00:00
|
|
|
registry = "index.docker.io",
|
|
|
|
repository = "gerritcodereview/gerrit",
|
2023-10-08 12:27:44 +00:00
|
|
|
tag = "3.7.5-ubuntu20",
|
2019-06-21 18:38:35 +00:00
|
|
|
)
|
|
|
|
|
2020-05-10 19:34:10 +00:00
|
|
|
# third_party/factorio
|
|
|
|
load("//third_party/factorio:factorio.bzl", "factorio_repositories")
|
2020-12-03 22:19:28 +00:00
|
|
|
|
2020-05-10 19:34:10 +00:00
|
|
|
factorio_repositories()
|
2020-04-01 00:05:42 +00:00
|
|
|
|
2020-04-12 16:37:21 +00:00
|
|
|
# For devtools/gerrit/gerrit-oauth-provider and gerrit OWNERS plugin
|
2019-06-21 17:59:52 +00:00
|
|
|
|
|
|
|
git_repository(
|
|
|
|
name = "com_googlesource_gerrit_bazlets",
|
2023-10-27 18:59:04 +00:00
|
|
|
# change 389378, https://gerrit-review.googlesource.com/c/bazlets/+/389378
|
|
|
|
commit = "0c120e55519b103477b6e0b0ce9130cd6f19abff",
|
2021-10-07 18:45:20 +00:00
|
|
|
remote = "https://gerrit.googlesource.com/bazlets",
|
2020-12-28 20:40:09 +00:00
|
|
|
shallow_since = "1606931369 -0600",
|
2019-06-21 17:59:52 +00:00
|
|
|
)
|
|
|
|
|
2023-10-08 12:27:44 +00:00
|
|
|
# Force newer version of Gerrit plugin API.
|
2020-06-20 23:26:22 +00:00
|
|
|
load("@com_googlesource_gerrit_bazlets//:gerrit_api.bzl", "gerrit_api")
|
2023-10-08 12:27:44 +00:00
|
|
|
gerrit_api(
|
|
|
|
version = "3.7.5",
|
|
|
|
plugin_api_sha1 = "1ea41f95da74045c2cdb30d359041a79b61e72ff",
|
2023-10-27 18:59:04 +00:00
|
|
|
acceptance_framework_sha1 = "aa51456eda49f928217de4bd46e4af8fbea8c4f1",
|
2023-10-08 12:27:44 +00:00
|
|
|
)
|
2019-06-21 17:59:52 +00:00
|
|
|
|
2021-07-11 12:32:36 +00:00
|
|
|
load("//devtools/gerrit/gerrit-oauth-provider:external_plugin_deps.bzl", gerrit_oauth_deps = "external_plugin_deps")
|
|
|
|
|
|
|
|
gerrit_oauth_deps(omit_commons_codec = False)
|
2020-04-12 16:37:21 +00:00
|
|
|
|
|
|
|
# Gerrit OWNERS plugins external repositories
|
|
|
|
|
|
|
|
git_repository(
|
|
|
|
name = "com_googlesource_gerrit_plugin_owners",
|
2023-10-08 12:27:44 +00:00
|
|
|
commit = "6db2d3f048f56fa49469d315b716787d21f8393f",
|
2021-10-07 18:45:20 +00:00
|
|
|
remote = "https://gerrit.googlesource.com/plugins/owners/",
|
2020-12-28 20:40:09 +00:00
|
|
|
shallow_since = "1593642470 +0200",
|
2023-10-08 12:27:44 +00:00
|
|
|
patch_args = ["-p1"],
|
|
|
|
patches = [
|
|
|
|
"//third_party:gerrit_plugins_owner.patch",
|
|
|
|
],
|
2020-04-12 16:37:21 +00:00
|
|
|
)
|
2021-07-11 12:32:36 +00:00
|
|
|
|
|
|
|
load("@com_googlesource_gerrit_plugin_owners//:external_plugin_deps_standalone.bzl", gerrit_owners_deps = "external_plugin_deps_standalone")
|
|
|
|
|
2020-12-17 22:32:42 +00:00
|
|
|
gerrit_owners_deps()
|
2020-04-12 16:37:21 +00:00
|
|
|
|
2019-07-21 21:56:43 +00:00
|
|
|
# Go image repos for Docker
|
|
|
|
|
2023-07-28 17:14:50 +00:00
|
|
|
load(
|
|
|
|
"@io_bazel_rules_docker//go:image.bzl",
|
|
|
|
go_image_repos = "repositories",
|
|
|
|
)
|
2020-12-03 22:19:28 +00:00
|
|
|
|
2023-07-28 17:14:50 +00:00
|
|
|
go_image_repos()
|
2020-06-13 20:43:06 +00:00
|
|
|
|
2022-02-01 09:36:47 +00:00
|
|
|
# //hswaw/site deps.
|
|
|
|
load("//hswaw/site:deps.bzl", "hswaw_site_deps")
|
2023-07-28 17:14:50 +00:00
|
|
|
|
2022-02-01 09:36:47 +00:00
|
|
|
hswaw_site_deps()
|
2021-10-07 18:45:20 +00:00
|
|
|
|
|
|
|
# noVNC, used by //dc/drackvm.
|
|
|
|
http_archive(
|
|
|
|
name = "com_github_novnc_novnc",
|
|
|
|
build_file_content = """
|
|
|
|
filegroup(
|
|
|
|
name = "distfiles",
|
|
|
|
srcs = [
|
|
|
|
"vnc.html",
|
|
|
|
] + glob([
|
|
|
|
"app/**",
|
|
|
|
"core/**",
|
|
|
|
"vendor/**",
|
|
|
|
]),
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
""",
|
|
|
|
sha256 = "2c972cca34376dfd2a54939e7e571e466511bf592d03e838440b3c8868441eaf",
|
|
|
|
strip_prefix = "noVNC-1.3.0-beta",
|
2021-10-07 19:24:31 +00:00
|
|
|
urls = ["https://github.com/novnc/noVNC/archive/refs/tags/v1.3.0-beta.tar.gz"],
|
2021-06-01 22:24:34 +00:00
|
|
|
)
|
2021-06-18 11:12:41 +00:00
|
|
|
|
|
|
|
# temporarily use upstream binary, see //cluster/tools/BUILD
|
|
|
|
http_file(
|
|
|
|
name = "calicoctl_3_15",
|
|
|
|
downloaded_file_path = "calicoctl",
|
|
|
|
executable = True,
|
2023-07-28 17:14:50 +00:00
|
|
|
sha256 = "f49e9e8d25108f7f22d5a51c756b2fe40cbe36347ad297e31a767376172f2845",
|
|
|
|
urls = ["https://github.com/projectcalico/calicoctl/releases/download/v3.15.5/calicoctl"],
|
2021-06-18 11:12:41 +00:00
|
|
|
)
|
2023-10-10 15:22:11 +00:00
|
|
|
|
|
|
|
# viz.js 2.x used by //dc/topo
|
|
|
|
load("//third_party:vizjs.bzl", "vizjs_repositories")
|
|
|
|
vizjs_repositories()
|