...

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

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

     1load("@container_structure_test//:defs.bzl", "container_structure_test")
     2load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
     3load("@rules_oci//oci:defs.bzl", "oci_load")
     4load("//hack/build/rules/container:index.bzl", "container_push", "go_oci_image")
     5
     6go_library(
     7    name = "clusterctl_lib",
     8    srcs = ["main.go"],
     9    importpath = "edge-infra.dev/cmd/edge/clusterctl",
    10    visibility = ["//visibility:public"],
    11    deps = [
    12        "//cmd/edge/clusterctl/gke-auth",
    13        "//pkg/edge/controllers/clusterctl",
    14        "//pkg/lib/logging",
    15        "@com_github_joho_godotenv//:godotenv",
    16    ],
    17)
    18
    19go_binary(
    20    name = "clusterctl",
    21    data = [
    22        ":envfile",
    23    ],
    24    embed = [":clusterctl_lib"],
    25    visibility = ["//visibility:public"],
    26)
    27
    28go_oci_image(
    29    name = "clusterctl_container",
    30    embed = [":clusterctl_lib"],
    31    tags = ["manual"],
    32)
    33
    34oci_load(
    35    name = "logreplay-image-load",
    36    image = ":clusterctl_container",
    37    repo_tags = ["logreplay:latest"],
    38    tags = ["manual"],
    39)
    40
    41filegroup(
    42    name = "logreplay-image.tar",
    43    srcs = [":logreplay-image-load"],
    44    output_group = "tarball",
    45)
    46
    47container_structure_test(
    48    name = "logreplay_image_structure_test",
    49    configs = [
    50        "logreplay_container_test.yaml",
    51    ],
    52    driver = "tar",
    53    image = ":logreplay-image.tar",
    54    tags = ["manual"],
    55)
    56
    57container_push(
    58    name = "container_push",
    59    image = ":clusterctl_container",
    60    image_name = "clusterctl",
    61    repository_file = "//hack/build/rules/container:workloads-repo",
    62)
    63
    64filegroup(
    65    name = "envfile",
    66    # buildifier: disable=constant-glob
    67    srcs = glob([".env"]),
    68    visibility = ["//visibility:public"],
    69)

View as plain text