Skip to content

Commit

Permalink
Adjust to OutputGroupInfo according to bazelbuild/bazel#7977
Browse files Browse the repository at this point in the history
  • Loading branch information
or-shachar committed Jul 14, 2019
1 parent 5ef6b2b commit f82c741
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions container/bundle.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def _container_bundle_impl(ctx):
files = depset(),
runfiles = ctx.runfiles(files = (stamp_files + runfiles)),
),
OutputGroupInfo(
tar = depset([attr.outputs.tar_output])
),
]

container_bundle_ = rule(
Expand All @@ -93,11 +96,9 @@ container_bundle_ = rule(
default = False,
mandatory = False,
),
"tar_output" = attr.output()
}, _layer_tools),
executable = True,
outputs = {
"out": "%{name}.tar",
},
toolchains = ["@io_bazel_rules_docker//toolchains/docker:toolchain_type"],
implementation = _container_bundle_impl,
)
Expand Down Expand Up @@ -128,4 +129,7 @@ def container_bundle(**kwargs):
kwargs["image_targets"] = values
kwargs["image_target_strings"] = values

name = kwargs["name"]
tar_output = kwargs.pop("tar_output", name + ".tar")
kwargs["tar_output"] = tar_out
container_bundle_(**kwargs)

0 comments on commit f82c741

Please sign in to comment.