load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") load("//hack/build/rules/container:index.bzl", "container_push", "go_oci_image") go_library( name = "bsl_lib", srcs = ["main.go"], importpath = "edge-infra.dev/cmd/edge/bsl", visibility = ["//visibility:private"], deps = [ "//pkg/edge/bsl-reconciler", "@com_github_joho_godotenv//:godotenv", ], ) # create a filegroup to wrap the .env file, which may or may not exist # consumers that would use .env directly as a data dep can just reference this # target instead filegroup( name = "envfile", # buildifier: disable=constant-glob srcs = glob([".env"]), visibility = ["//visibility:public"], ) go_binary( name = "bsl", data = [ ":envfile", ], embed = [":bsl_lib"], visibility = ["//visibility:public"], ) go_oci_image( name = "bsl_container", embed = [":bsl_lib"], tags = ["manual"], ) container_push( name = "container_push", image = ":bsl_container", image_name = "edge-bsl", repository_file = "//hack/build/rules/container:workloads-repo", )