blob: 974258abded523440e898ba66179f626543e0a1b [file] [log] [blame]
Serge Bazanski77cb6c52020-12-19 00:09:22 +01001load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
Leopolde2a302a2023-01-15 15:39:18 +01002load("@bazel_skylib//rules:native_binary.bzl", "native_test")
Serge Bazanski77cb6c52020-12-19 00:09:22 +01003
4go_library(
Serge Bazanski6a328e62024-02-12 17:37:50 +01005 name = "launch-cluster_lib",
Serge Bazanski77cb6c52020-12-19 00:09:22 +01006 srcs = ["main.go"],
Serge Bazanski6a328e62024-02-12 17:37:50 +01007 importpath = "source.monogon.dev/metropolis/test/launch/cli/launch-cluster",
Serge Bazanski77cb6c52020-12-19 00:09:22 +01008 visibility = ["//visibility:private"],
Serge Bazanski075465c2021-11-16 15:38:49 +01009 deps = [
Serge Bazanski1f8cad72023-03-20 16:58:10 +010010 "//metropolis/cli/metroctl/core",
Lorenz Brund13c1c62022-03-30 19:58:58 +020011 "//metropolis/cli/pkg/context",
12 "//metropolis/test/launch/cluster",
Serge Bazanski075465c2021-11-16 15:38:49 +010013 ],
Serge Bazanski77cb6c52020-12-19 00:09:22 +010014)
15
16go_binary(
Serge Bazanski6a328e62024-02-12 17:37:50 +010017 name = "launch-cluster_bin",
Serge Bazanski77cb6c52020-12-19 00:09:22 +010018 data = [
Serge Bazanski1f8cad72023-03-20 16:58:10 +010019 "//metropolis/cli/metroctl",
Serge Bazanski77cb6c52020-12-19 00:09:22 +010020 ],
Serge Bazanski6a328e62024-02-12 17:37:50 +010021 embed = [":launch-cluster_lib"],
Serge Bazanski0be9be82021-01-07 15:23:44 +010022 visibility = ["//:__pkg__"],
Serge Bazanski77cb6c52020-12-19 00:09:22 +010023)
Leopolde2a302a2023-01-15 15:39:18 +010024
Serge Bazanski6a328e62024-02-12 17:37:50 +010025# Wrap the binary in a native_test so that we can run it with the
26# `bazel test` command inside the sandbox.
Leopolde2a302a2023-01-15 15:39:18 +010027native_test(
Serge Bazanski6a328e62024-02-12 17:37:50 +010028 name = "launch-cluster",
29 src = ":launch-cluster_bin",
30 out = "launch",
Leopolde2a302a2023-01-15 15:39:18 +010031 tags = ["manual"],
32 visibility = ["//visibility:public"],
33)