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

go_library(
    name = "go_default_library",
    srcs = ["testgrid.go"],
    importpath = "k8s.io/release/pkg/testgrid",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/http:go_default_library",
        "@com_github_googlecloudplatform_testgrid//config:go_default_library",
        "@com_github_googlecloudplatform_testgrid//pb/config:go_default_library",
        "@com_github_pkg_errors//:go_default_library",
        "@com_github_sirupsen_logrus//:go_default_library",
    ],
)

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

filegroup(
    name = "all-srcs",
    srcs = [
        ":package-srcs",
        "//pkg/testgrid/testgridfakes:all-srcs",
    ],
    tags = ["automanaged"],
    visibility = ["//visibility:public"],
)

go_test(
    name = "go_default_test",
    srcs = ["testgrid_test.go"],
    embed = [":go_default_library"],
    deps = [
        "//pkg/git:go_default_library",
        "//pkg/testgrid/testgridfakes:go_default_library",
        "@com_github_golang_protobuf//proto:go_default_library",
        "@com_github_googlecloudplatform_testgrid//pb/config:go_default_library",
        "@com_github_stretchr_testify//require:go_default_library",
    ],
)
