Created
August 29, 2021 16:53
-
-
Save nij4t/3f07c67ab6761c80ced9512092cedd1b to your computer and use it in GitHub Desktop.
Macro that generates multiple targets for container image push
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load("@io_bazel_rules_docker//container:container.bzl", "container_push") | |
def push_multiple_containers(registry, tag, images, visibility = ["//visibility:public"], **kwargs): | |
[container_push( | |
name = "push_" + image.get("name"), | |
image = image.get("image"), | |
format = "Docker", | |
registry = registry, | |
repository = image.get("repository"), | |
tag = tag | |
) for image in images] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment