...

Text file src/edge-infra.dev/hack/sds/offlinemetrics/BUILD.bazel

Documentation: edge-infra.dev/hack/sds/offlinemetrics

     1load("@rules_oci//oci:defs.bzl", "oci_image", "oci_load")
     2load("@rules_pkg//:pkg.bzl", "pkg_tar")
     3load("@rules_python//python/entry_points:py_console_script_binary.bzl", "py_console_script_binary")
     4load("//hack/build/rules/container:index.bzl", "container_push")
     5
     6py_console_script_binary(
     7    name = "procpath",
     8    pkg = "@pip//procpath",
     9    visibility = ["//:__subpackages__"],
    10)
    11
    12pkg_tar(
    13    name = "files",
    14    srcs = [
    15        ":procpath",
    16    ],
    17    extension = "tgz",
    18    files = {
    19        ":capture": "capture",
    20    },
    21    include_runfiles = True,
    22    mode = "755",
    23    package_dir = "/usr/local/bin/",
    24)
    25
    26oci_image(
    27    name = "offlinemetrics_image",
    28    base = "@python_3_11_alpine",
    29    tars = ["files"],
    30)
    31
    32oci_load(
    33    name = "offlinemetrics_image_tar",
    34    image = ":offlinemetrics_image",
    35    repo_tags = ["offlinemetrics:latest"],
    36)
    37
    38container_push(
    39    name = "container_push",
    40    image = ":offlinemetrics_image",
    41    image_name = "offlinemetrics",
    42    repository_file = "//hack/build/rules/container:workloads-repo",
    43)

View as plain text