...

Text file src/edge-infra.dev/pkg/f8n/warehouse/oci/layout/BUILD.bazel

Documentation: edge-infra.dev/pkg/f8n/warehouse/oci/layout

     1load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
     2load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
     3load("//test/snapshot:snapshot.bzl", "generate_snapshots")
     4
     5go_library(
     6    name = "layout",
     7    srcs = ["layout.go"],
     8    importpath = "edge-infra.dev/pkg/f8n/warehouse/oci/layout",
     9    visibility = ["//visibility:public"],
    10    deps = [
    11        "//pkg/f8n/warehouse",
    12        "//pkg/f8n/warehouse/oci",
    13        "//pkg/f8n/warehouse/oci/cmp",
    14        "//pkg/f8n/warehouse/oci/match",
    15        "//pkg/f8n/warehouse/oci/name",
    16        "@com_github_google_go_containerregistry//pkg/name",
    17        "@com_github_google_go_containerregistry//pkg/v1:pkg",
    18        "@com_github_google_go_containerregistry//pkg/v1/empty",
    19        "@com_github_google_go_containerregistry//pkg/v1/layout",
    20        "@com_github_opencontainers_image_spec//specs-go/v1:specs-go",
    21    ],
    22)
    23
    24go_test(
    25    name = "layout_test",
    26    srcs = ["layout_test.go"],
    27    data = glob(["testdata/**"]),
    28    embed = [":layout"],
    29    deps = [
    30        "//pkg/f8n/warehouse/cluster",
    31        "//pkg/f8n/warehouse/lift",
    32        "//pkg/f8n/warehouse/oci",
    33        "//pkg/f8n/warehouse/oci/layer",
    34        "//pkg/f8n/warehouse/pallet",
    35        "//pkg/lib/build/bazel",
    36        "//pkg/lib/uuid",
    37        "//test/snapshot",
    38        "@com_github_google_go_containerregistry//pkg/name",
    39        "@com_github_stretchr_testify//assert",
    40    ],
    41)
    42
    43generate_snapshots(
    44    name = "layout_snapshots",
    45    testonly = True,
    46    srcs = glob(["testdata/**"]),
    47    snapshot_path = "pkg/f8n/warehouse/oci/layout/testdata/snapshots",
    48    snapshot_test = ":layout_test",
    49)
    50
    51write_source_files(
    52    name = "update_snapshots_layout",
    53    testonly = True,
    54    files = {
    55        "testdata/snapshots": ":layout_snapshots",
    56    },
    57)

View as plain text