blob: d9121bbd64b8be6103f5888641e77097a75906d9 [file] [log] [blame]
Leopold Schabel5c80aca2019-10-22 15:48:58 +02001load("@bazel_gazelle//:def.bzl", "gazelle")
Serge Bazanski0ef96292021-05-21 15:41:32 +02002load("@io_bazel_rules_go//go:def.bzl", "go_path")
Leopold Schabel5c80aca2019-10-22 15:48:58 +02003
Serge Bazanski31370b02021-01-07 16:31:14 +01004# gazelle:prefix source.monogon.dev
Lorenz Brund13c1c62022-03-30 19:58:58 +02005# gazelle:go_naming_convention import
Leopold Schabel5c80aca2019-10-22 15:48:58 +02006gazelle(name = "gazelle")
Leopold Schabeld868d692019-11-17 17:28:29 +01007
Serge Bazanski116c4a62021-09-24 14:22:27 +02008alias(
9 name = "fietsje",
Serge Bazanski4b1e37c2021-09-28 12:49:15 +020010 actual = "//build/fietsje/cmd",
Serge Bazanski116c4a62021-09-24 14:22:27 +020011)
Serge Bazanskif369cfa2020-05-22 18:36:42 +020012
Leopold Schabeld868d692019-11-17 17:28:29 +010013# Shortcut for the Go SDK
14alias(
15 name = "go",
16 actual = "@go_sdk//:bin/go",
Leopold Schabela4516f92019-12-04 20:27:05 +000017 visibility = ["//visibility:public"],
18)
19
Serge Bazanski7a1b10c2020-02-11 10:02:21 +010020load("@rules_python//python:defs.bzl", "py_runtime_pair")
21
22# Python toolchains - just use the host python for now.
23# TODO(T649): move to external (nix?) interpreters.
24py_runtime(
25 name = "host_python3",
26 interpreter_path = "/usr/bin/python3",
27 python_version = "PY3",
28)
29
30py_runtime(
31 name = "host_python2",
32 interpreter_path = "/usr/bin/python2",
33 python_version = "PY2",
34)
35
36py_runtime_pair(
37 name = "host_python_pair",
38 py2_runtime = ":host_python2",
39 py3_runtime = ":host_python3",
40)
41
42toolchain(
43 name = "host_python",
44 toolchain = ":host_python_pair",
45 toolchain_type = "@rules_python//python:toolchain_type",
46)
Serge Bazanski2fb13a82020-02-11 12:41:37 +010047
Leopold Schabel26d41992020-12-15 19:27:58 +010048# Shortcuts for top-level binaries/tools
49
Serge Bazanski2fb13a82020-02-11 12:41:37 +010050# Shortcut for kubectl when running through bazel run
51# (don't depend on this, it might turn into an env-based PATH shortcut, use
Serge Bazanskibb7db922020-04-30 12:43:10 +020052# @io_k8s_kubernetes//cmd/kubectl instead)
Serge Bazanski2fb13a82020-02-11 12:41:37 +010053alias(
54 name = "kubectl",
Serge Bazanskibb7db922020-04-30 12:43:10 +020055 actual = "@io_k8s_kubernetes//cmd/kubectl:kubectl",
Serge Bazanski2fb13a82020-02-11 12:41:37 +010056)
Leopold Schabel3058b7a2020-06-03 17:51:07 +020057
58# Shortcut for the Delve debugger for interactive debugging
59alias(
60 name = "dlv",
61 actual = "@com_github_go_delve_delve//cmd/dlv:dlv",
62)
Lorenz Brunfc5dbc62020-05-28 12:18:07 +020063
Serge Bazanski662b5b32020-12-21 13:49:00 +010064# Shortcut for launching a single Metropolis node instance in a VM.
Lorenz Brunfc5dbc62020-05-28 12:18:07 +020065alias(
66 name = "launch",
Serge Bazanski77cb6c52020-12-19 00:09:22 +010067 actual = "//metropolis/test/launch/cli/launch",
Lorenz Brunfc5dbc62020-05-28 12:18:07 +020068)
Lorenz Brun52f7f292020-06-24 16:42:02 +020069
Serge Bazanski662b5b32020-12-21 13:49:00 +010070# Shortcut for launching a virtual network a Metropolis cluster consisting of two nodes.
Lorenz Brun52f7f292020-06-24 16:42:02 +020071alias(
72 name = "launch-multi2",
Serge Bazanski77cb6c52020-12-19 00:09:22 +010073 actual = "//metropolis/test/launch/cli/launch-multi2",
Lorenz Brun52f7f292020-06-24 16:42:02 +020074)
Leopold Schabel26d41992020-12-15 19:27:58 +010075
76alias(
Leopold Schabeld2120142021-12-03 21:30:49 +010077 name = "metroctl",
78 actual = "//metropolis/cli/metroctl:metroctl",
79)
80
81alias(
Leopold Schabel26d41992020-12-15 19:27:58 +010082 name = "goimports",
83 actual = "@org_golang_x_tools//cmd/goimports:goimports",
84 visibility = ["//visibility:public"],
85)