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_binary( name = "authproxy", data = [ ":envfile", ], embed = [":auth-proxy"], visibility = ["//visibility:public"], ) # 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_oci_image( name = "auth_proxy_container", embed = [":auth-proxy"], tags = ["manual"], ) container_push( name = "container_push", image = ":auth_proxy_container", image_name = "auth-proxy", repository_file = "//hack/build/rules/container:workloads-repo", visibility = ["//visibility:public"], ) go_library( name = "auth-proxy", srcs = ["server.go"], importpath = "edge-infra.dev/cmd/edge/auth-proxy", visibility = ["//visibility:private"], deps = [ "//pkg/edge/auth-proxy", "@com_github_joho_godotenv//:godotenv", ], )