...

Text file src/edge-infra.dev/hack/tools/fetch-digests/fetch-digests.bzl

Documentation: edge-infra.dev/hack/tools/fetch-digests

     1"""Defines high-level macros for fetch_digest"""
     2
     3def fetch_digests(tag, registry, repo, images, name = "fetch-digests"):
     4    """Macro for using `fetch_digest` from a list of images it will produce a file to source list of container digests from"""
     5
     6    native.genrule(
     7        name = name,
     8        srcs = [],
     9        outs = [name + "_digest"],
    10        cmd = "echo $(location //hack/tools/fetch-digests:fetch-digests.sh) {0} {1} {2} {3} $(location @com_github_google_go_containerregistry//cmd/crane) > $@".format(tag, registry, repo, ",".join(images)),
    11        executable = True,
    12        tools = [
    13            "//hack/tools/fetch-digests:fetch-digests.sh",
    14            "@com_github_google_go_containerregistry//cmd/crane",
    15        ],
    16    )

View as plain text