Skip to content

Commit

Permalink
Adding zstd compression to oci_image_layer rule.
Browse files Browse the repository at this point in the history
Adding hooks for zstd compression in _oci_image_layer_impl.
  • Loading branch information
alandonham committed Dec 3, 2024
1 parent 21005c0 commit 8759548
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions oci/image.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def _oci_image_layer_impl(ctx):
"--outd={}".format(descriptor_file.path),
"--dir={}".format(ctx.attr.directory),
"--bazel-label={}".format(ctx.label),
"--zstd-compression={}".format(ctx.attr.zstd_compression),
] +
["--file={}".format(f.path) for f in ctx.files.files] +
["--symlink={}={}".format(k, v) for k, v in ctx.attr.symlinks.items()] +
Expand Down Expand Up @@ -70,6 +71,10 @@ oci_image_layer = rule(
doc = "Dictionary of file -> file location in tarball",
allow_files = True,
),
"zstd_compression": attr.bool(
doc = "Indicates whether zstd compression should be used.",
default = False,
),
},
toolchains = ["@com_github_datadog_rules_oci//oci:toolchain"],
outputs = {
Expand Down

0 comments on commit 8759548

Please sign in to comment.