load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = ["config.go"],
    importpath = "github.com/GoogleCloudPlatform/testgrid/config",
    visibility = ["//visibility:public"],
    deps = [
        "//pb/config:go_default_library",
        "//util/gcs:go_default_library",
        "@com_github_golang_protobuf//proto:go_default_library",
        "@com_github_hashicorp_go_multierror//:go_default_library",
        "@com_google_cloud_go//storage:go_default_library",
    ],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [
        ":package-srcs",
        "//config/yamlcfg:all-srcs",
    ],
    tags = ["automanaged"],
    visibility = ["//visibility:public"],
)

go_test(
    name = "go_default_test",
    srcs = ["config_test.go"],
    embed = [":go_default_library"],
    deps = [
        "//pb/config:go_default_library",
        "@com_github_hashicorp_go_multierror//:go_default_library",
    ],
)
