Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/load.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion oci/private/load.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ attrs = {
executable = True,
cfg = "target",
),
"tarball_name": attr.string(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we usually call this output using attr.output can you follow that pattern?

default = "tarball.tar",
doc = "Name of the tarball file to generate.",
),
"_run_template": attr.label(
default = Label("//oci/private:load.sh.tpl"),
doc = """ \
Expand Down Expand Up @@ -199,7 +203,7 @@ def _load_impl(ctx):

# This action produces a large output and should rarely be used as it puts load on the cache.
# It will only run if the "tarball" output_group is explicitly requested
tarball = ctx.actions.declare_file("{}/tarball.tar".format(ctx.label.name))
tarball = ctx.actions.declare_file("{}/{}".format(ctx.label.name, ctx.attr.tarball_name))
tar_inputs = depset(direct = mtree_outputs, transitive = [mtree_inputs])
tar_args = ctx.actions.args()
tar_args.add_all(["--create", "--no-xattr", "--no-mac-metadata"])
Expand Down