...

Text file src/edge-infra.dev/cmd/sds/emergencyaccess/authservice/BUILD.bazel

Documentation: edge-infra.dev/cmd/sds/emergencyaccess/authservice

     1load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
     2load("//hack/build/rules/container:index.bzl", "container_push", "go_oci_image")
     3
     4# create a filegroup to wrap the .env file, which may or may not exist
     5# consumers that would use .env directly as a data dep can just reference this
     6# target instead
     7filegroup(
     8    name = "envfile",
     9    # buildifier: disable=constant-glob
    10    srcs = glob([".env"]),
    11    visibility = ["//visibility:public"],
    12)
    13
    14go_library(
    15    name = "authservice_lib",
    16    srcs = ["main.go"],
    17    importpath = "edge-infra.dev/cmd/sds/emergencyaccess/authservice",
    18    visibility = ["//visibility:private"],
    19    deps = [
    20        "//pkg/lib/fog",
    21        "//pkg/sds/emergencyaccess/authservice/server",
    22        "@com_github_joho_godotenv//:godotenv",
    23    ],
    24)
    25
    26go_binary(
    27    name = "authservice",
    28    data = [
    29        ":envfile",
    30    ],
    31    embed = [":authservice_lib"],
    32    visibility = ["//visibility:public"],
    33)
    34
    35go_oci_image(
    36    name = "authservice_container",
    37    embed = [":authservice_lib"],
    38    tags = ["manual"],
    39)
    40
    41container_push(
    42    name = "container_push",
    43    image = ":authservice_container",
    44    image_name = "ea-authservice",
    45    repository_file = "//hack/build/rules/container:workloads-repo",
    46    visibility = ["//visibility:public"],
    47)

View as plain text