load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") load("//hack/build/rules/container:index.bzl", "container_push", "go_oci_image") # 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_library( name = "rulesengine_lib", srcs = ["main.go"], importpath = "edge-infra.dev/cmd/sds/emergencyaccess/rulesengine", visibility = ["//visibility:private"], deps = [ "//pkg/lib/fog", "//pkg/sds/emergencyaccess/rules/server", "@com_github_joho_godotenv//:godotenv", ], ) go_binary( name = "rulesengine", data = [ ":envfile", ], embed = [":rulesengine_lib"], visibility = ["//visibility:public"], ) go_oci_image( name = "rulesengine_container", embed = [":rulesengine_lib"], tags = ["manual"], ) container_push( name = "container_push", image = ":rulesengine_container", image_name = "ea-rulesengine", repository_file = "//hack/build/rules/container:workloads-repo", visibility = ["//visibility:public"], )