load("@container_structure_test//:defs.bzl", "container_structure_test") load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") load("@rules_oci//oci:defs.bzl", "oci_load") load("//hack/build/rules/container:index.bzl", "container_push", "go_oci_image") go_library( name = "clusterctl_lib", srcs = ["main.go"], importpath = "edge-infra.dev/cmd/edge/clusterctl", visibility = ["//visibility:public"], deps = [ "//cmd/edge/clusterctl/gke-auth", "//pkg/edge/controllers/clusterctl", "//pkg/lib/logging", "@com_github_joho_godotenv//:godotenv", ], ) go_binary( name = "clusterctl", data = [ ":envfile", ], embed = [":clusterctl_lib"], visibility = ["//visibility:public"], ) go_oci_image( name = "clusterctl_container", embed = [":clusterctl_lib"], tags = ["manual"], ) oci_load( name = "logreplay-image-load", image = ":clusterctl_container", repo_tags = ["logreplay:latest"], tags = ["manual"], ) filegroup( name = "logreplay-image.tar", srcs = [":logreplay-image-load"], output_group = "tarball", ) container_structure_test( name = "logreplay_image_structure_test", configs = [ "logreplay_container_test.yaml", ], driver = "tar", image = ":logreplay-image.tar", tags = ["manual"], ) container_push( name = "container_push", image = ":clusterctl_container", image_name = "clusterctl", repository_file = "//hack/build/rules/container:workloads-repo", ) filegroup( name = "envfile", # buildifier: disable=constant-glob srcs = glob([".env"]), visibility = ["//visibility:public"], )