From f82c741ee0c82a7537b345c4c483c9de85914c6a Mon Sep 17 00:00:00 2001 From: Or Shachar Date: Sun, 14 Jul 2019 14:54:40 +0300 Subject: [PATCH] Adjust to OutputGroupInfo according to https://github.com/bazelbuild/bazel/issues/7977 --- container/bundle.bzl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/container/bundle.bzl b/container/bundle.bzl index 3bfa7c083..c99c11f61 100644 --- a/container/bundle.bzl +++ b/container/bundle.bzl @@ -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( @@ -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, ) @@ -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)