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

go_library(
    name = "go_default_library",
    srcs = ["install.go"],
    importpath = "github.com/jetstack/cert-manager/pkg/internal/apis/certmanager/install",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/internal/api/mutation:go_default_library",
        "//pkg/internal/api/validation:go_default_library",
        "//pkg/internal/apis/certmanager:go_default_library",
        "//pkg/internal/apis/certmanager/identity:go_default_library",
        "//pkg/internal/apis/certmanager/v1:go_default_library",
        "//pkg/internal/apis/certmanager/v1alpha2:go_default_library",
        "//pkg/internal/apis/certmanager/v1alpha3:go_default_library",
        "//pkg/internal/apis/certmanager/v1beta1:go_default_library",
        "//pkg/internal/apis/certmanager/validation:go_default_library",
        "//pkg/internal/apis/meta/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/runtime:go_default_library",
        "@io_k8s_apimachinery//pkg/util/runtime:go_default_library",
    ],
)

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

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

go_test(
    name = "go_default_test",
    srcs = [
        "pruning_test.go",
        "roundtrip_test.go",
    ],
    data = [
        "//deploy/crds:templated_files",
    ],
    embed = [":go_default_library"],
    deps = [
        "//pkg/api:go_default_library",
        "//pkg/api/testing:go_default_library",
        "//pkg/internal/apis/certmanager/fuzzer:go_default_library",
        "@com_github_munnerz_crd_schema_fuzz//:go_default_library",
        "@io_k8s_apimachinery//pkg/api/apitesting/roundtrip:go_default_library",
    ],
)
