blob: cf0917eec147b0d7df4b51d95116224ce412293e [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/static_binary_tarball:def.bzl", "static_binary_tarball")
go_library(
name = "persistentvolume_lib",
srcs = ["main.go"],
importpath = "source.monogon.dev/metropolis/test/e2e/persistentvolume",
visibility = ["//visibility:private"],
deps = [
"//osbase/blockdev",
"@org_golang_x_sys//unix",
],
)
go_binary(
name = "persistentvolume",
embed = [":persistentvolume_lib"],
pure = "on",
visibility = ["//visibility:private"],
)
static_binary_tarball(
name = "persistentvolume_layer",
executable = ":persistentvolume",
visibility = ["//visibility:private"],
)
oci_image(
name = "persistentvolume_image",
base = "@distroless_base",
entrypoint = ["/app/metropolis/test/e2e/persistentvolume/persistentvolume_/persistentvolume"],
tars = [":persistentvolume_layer"],
visibility = ["//metropolis/test/e2e:__pkg__"],
workdir = "/app",
)