blob: 678c86f3c8faa22b89d0d52935aad44de453dff5 [file] [log] [blame]
Jan Schär652c2ad2024-11-19 17:40:50 +01001load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
Tim Windelschmidt681d5152025-01-08 00:19:33 +01002load("@rules_oci//oci:defs.bzl", "oci_image")
Jan Schär06341a62025-07-09 08:02:35 +00003load("//build/binary_tarball:def.bzl", "binary_tarball")
Jan Schär652c2ad2024-11-19 17:40:50 +01004
5go_library(
6 name = "persistentvolume_lib",
7 srcs = ["main.go"],
8 importpath = "source.monogon.dev/metropolis/test/e2e/persistentvolume",
9 visibility = ["//visibility:private"],
Jan Schärbe70c922024-11-21 11:16:03 +010010 deps = [
11 "//osbase/blockdev",
12 "@org_golang_x_sys//unix",
13 ],
Jan Schär652c2ad2024-11-19 17:40:50 +010014)
15
16go_binary(
17 name = "persistentvolume",
18 embed = [":persistentvolume_lib"],
Jan Schär652c2ad2024-11-19 17:40:50 +010019 visibility = ["//visibility:private"],
20)
21
Jan Schär06341a62025-07-09 08:02:35 +000022binary_tarball(
Jan Schär652c2ad2024-11-19 17:40:50 +010023 name = "persistentvolume_layer",
Tim Windelschmidt681d5152025-01-08 00:19:33 +010024 executable = ":persistentvolume",
Jan Schär652c2ad2024-11-19 17:40:50 +010025 visibility = ["//visibility:private"],
26)
27
Jan Schär652c2ad2024-11-19 17:40:50 +010028oci_image(
29 name = "persistentvolume_image",
30 base = "@distroless_base",
Tim Windelschmidt681d5152025-01-08 00:19:33 +010031 entrypoint = ["/app/metropolis/test/e2e/persistentvolume/persistentvolume_/persistentvolume"],
Jan Schär652c2ad2024-11-19 17:40:50 +010032 tars = [":persistentvolume_layer"],
33 visibility = ["//metropolis/test/e2e:__pkg__"],
34 workdir = "/app",
35)