blob: 7636cdda4e238b972936fa20038f35ad698b0bab [file] [log] [blame]
Serge Bazanskicaa12082023-02-16 14:54:04 +01001load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
Tim Windelschmidt8867b2c2023-04-06 15:09:30 +02002load("//build/static_binary_tarball:def.bzl", "static_binary_tarball")
Serge Bazanskicaa12082023-02-16 14:54:04 +01003
4go_binary(
5 name = "test_agent",
6 embed = [":test_agent_lib"],
7 visibility = [
Tim Windelschmidtb6308cd2023-10-10 21:19:03 +02008 "//cloud/shepherd/manager:__pkg__",
Serge Bazanskicaa12082023-02-16 14:54:04 +01009 ],
10)
11
12go_library(
13 name = "test_agent_lib",
14 srcs = ["main.go"],
Tim Windelschmidtb6308cd2023-10-10 21:19:03 +020015 importpath = "source.monogon.dev/cloud/shepherd/manager/test_agent",
Serge Bazanskicaa12082023-02-16 14:54:04 +010016 visibility = ["//visibility:private"],
17 deps = [
18 "//cloud/agent/api",
19 "@org_golang_google_protobuf//proto",
20 ],
21)
Tim Windelschmidt8867b2c2023-04-06 15:09:30 +020022
23# Used by container_images, forces a static build of the test_agent.
24static_binary_tarball(
25 name = "test_agent_layer",
26 executable = ":test_agent",
27 visibility = ["//visibility:public"],
28)