...

Text file src/edge-infra.dev/cmd/edge/bannerctl/BUILD.bazel

Documentation: edge-infra.dev/cmd/edge/bannerctl

     1load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
     2load("//hack/build/rules/container:index.bzl", "container_push", "go_oci_image")
     3
     4go_library(
     5    name = "bannerctl_lib",
     6    srcs = ["main.go"],
     7    importpath = "edge-infra.dev/cmd/edge/bannerctl",
     8    visibility = ["//visibility:private"],
     9    deps = [
    10        "//pkg/edge/controllers/bannerctl",
    11        "@com_github_joho_godotenv//:godotenv",
    12    ],
    13)
    14
    15go_binary(
    16    name = "bannerctl",
    17    data = [
    18        ":envfile",
    19    ],
    20    embed = [":bannerctl_lib"],
    21    visibility = ["//visibility:public"],
    22)
    23
    24filegroup(
    25    name = "envfile",
    26    # buildifier: disable=constant-glob
    27    srcs = glob([".env"]),
    28    visibility = ["//visibility:public"],
    29)
    30
    31go_oci_image(
    32    name = "bannerctl_container",
    33    embed = [":bannerctl_lib"],
    34    tags = ["manual"],
    35)
    36
    37container_push(
    38    name = "container_push",
    39    image = ":bannerctl_container",
    40    image_name = "bannerctl",
    41    repository_file = "//hack/build/rules/container:workloads-repo",
    42)

View as plain text