Currently, the az storage rule copies the files to existing ones in a Bazel target to the container considering the existing path in the project's bazel-out.
E.g:
# BUILD.bazel in path/to/
genrule(
name = "generate",
outs = [
"generated1.txt",
],
cmd = """
echo -e 'This is a file generated by a genrule rule and will be copied to a blobstorage.' > $(location generated1.txt);
""",
visibility = ["//visibility:public"],
)
az_storage(
name = "foo",
srcs = [
":generate",
],
account_name = "bar",
config = ":config",
container_name = "baz",
)
When executing the target bazel run //path/to:foo.copy the artifacts will be copied to the container following the pattern: <container_name>/<path_to_target>.
The end result would be something like: baz/path/fo/generated1.txt
The proposal is to change the type of the srcs attribute from label_list to label_keyed_string_dict so that it is possible to define a path at will.
Currently, the az storage rule copies the files to existing ones in a Bazel target to the container considering the existing path in the project's bazel-out.
E.g:
When executing the target
bazel run //path/to:foo.copy
the artifacts will be copied to the container following the pattern:<container_name>/<path_to_target>
. The end result would be something like:baz/path/fo/generated1.txt
The proposal is to change the type of the srcs attribute from
label_list
tolabel_keyed_string_dict
so that it is possible to define a path at will.