github.com/abayer/test-infra@v0.0.5/robots/issue-creator/BUILD.bazel (about)

     1  load("@io_bazel_rules_docker//docker:docker.bzl", "docker_bundle")
     2  load("@io_bazel_rules_docker//contrib:push-all.bzl", "docker_push")
     3  load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
     4  load("@io_bazel_rules_docker//go:image.bzl", "go_image")
     5  
     6  docker_bundle(
     7      name = "bundle",
     8      images = {
     9          "{STABLE_DOCKER_REPO}/issue-creator:{DOCKER_TAG}": ":issue-creator-image",
    10          "{STABLE_DOCKER_REPO}/issue-creator:latest": ":issue-creator-image",
    11          "{STABLE_DOCKER_REPO}/issue-creator:latest-{BUILD_USER}": ":issue-creator-image",
    12      },
    13      stamp = True,
    14  )
    15  
    16  docker_push(
    17      name = "push",
    18      bundle = ":bundle",
    19  )
    20  
    21  go_library(
    22      name = "go_default_library",
    23      srcs = ["main.go"],
    24      importpath = "k8s.io/test-infra/robots/issue-creator",
    25      visibility = ["//visibility:private"],
    26      deps = [
    27          "//robots/issue-creator/creator:go_default_library",
    28          "//robots/issue-creator/sources:go_default_library",
    29      ],
    30  )
    31  
    32  go_image(
    33      name = "issue-creator-image",
    34      base = "@distroless-base//image",
    35      embed = [":go_default_library"],
    36      visibility = ["//visibility:public"],
    37  )
    38  
    39  filegroup(
    40      name = "package-srcs",
    41      srcs = glob(["**"]),
    42      visibility = ["//visibility:private"],
    43  )
    44  
    45  filegroup(
    46      name = "all-srcs",
    47      srcs = [
    48          ":package-srcs",
    49          "//robots/issue-creator/creator:all-srcs",
    50          "//robots/issue-creator/sources:all-srcs",
    51          "//robots/issue-creator/testowner:all-srcs",
    52      ],
    53      visibility = ["//visibility:public"],
    54  )
    55  
    56  filegroup(
    57      name = "test-owners-csv",
    58      srcs = [
    59          "test_owners.csv",
    60      ],
    61  )
    62  
    63  # Delete after gazelle stops forcing its creation
    64  go_binary(
    65      name = "issue-creator",
    66      embed = [":go_default_library"],
    67      visibility = ["//visibility:public"],
    68  )