Skip to content

Commit 28ca3ef

Browse files
committedJul 14, 2019
Adjust to OutputGroupInfo according to bazelbuild/bazel#7977
1 parent 5ef6b2b commit 28ca3ef

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed
 

‎container/bundle.bzl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ def _container_bundle_impl(ctx):
8181
files = depset(),
8282
runfiles = ctx.runfiles(files = (stamp_files + runfiles)),
8383
),
84+
OutputGroupInfo(
85+
tar = depset([attr.outputs.tar_output]),
86+
),
8487
]
8588

8689
container_bundle_ = rule(
@@ -93,11 +96,9 @@ container_bundle_ = rule(
9396
default = False,
9497
mandatory = False,
9598
),
99+
"tar_output": attr.output(),
96100
}, _layer_tools),
97101
executable = True,
98-
outputs = {
99-
"out": "%{name}.tar",
100-
},
101102
toolchains = ["@io_bazel_rules_docker//toolchains/docker:toolchain_type"],
102103
implementation = _container_bundle_impl,
103104
)
@@ -128,4 +129,7 @@ def container_bundle(**kwargs):
128129
kwargs["image_targets"] = values
129130
kwargs["image_target_strings"] = values
130131

132+
name = kwargs["name"]
133+
tar_output = kwargs.pop("tar_output", name + ".tar")
134+
kwargs["tar_output"] = tar_output
131135
container_bundle_(**kwargs)

0 commit comments

Comments
 (0)