blob: 8535eced2ef04b16c3c64b9b0a9ec6784a658240 [file] [log] [blame]
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@rules_oci//oci:defs.bzl", "oci_image")
load("//build/binary_tarball:def.bzl", "binary_tarball")
go_library(
name = "httpserver_lib",
srcs = ["main.go"],
importpath = "source.monogon.dev/metropolis/test/e2e/httpserver",
visibility = ["//visibility:private"],
)
go_binary(
name = "httpserver",
embed = [":httpserver_lib"],
visibility = ["//visibility:private"],
)
binary_tarball(
name = "httpserver_layer",
executable = ":httpserver",
visibility = ["//visibility:private"],
)
oci_image(
name = "httpserver_image",
base = "@distroless_base",
entrypoint = ["/app/metropolis/test/e2e/httpserver/httpserver_/httpserver"],
tars = [":httpserver_layer"],
visibility = ["//metropolis/test/e2e:__pkg__"],
workdir = "/app",
)