Skip to content

Commit 68555bb

Browse files
committed
avoid building container images unless requested
1 parent 44f0675 commit 68555bb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tools/container.bzl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
load("@rules_img//img:image.bzl", "image_index", "image_manifest")
12
load("@rules_img//img:layer.bzl", "image_layer")
2-
load("@rules_img//img:image.bzl", "image_manifest", "image_index")
33
load("@rules_img//img:push.bzl", "image_push")
44

55
def multiarch_go_image(name, binary):
@@ -16,6 +16,9 @@ def multiarch_go_image(name, binary):
1616
image_layer(
1717
name = tar_target,
1818
srcs = {"app/{}".format(native.package_relative_label(binary).name): binary},
19+
# Don't build un-transitioned images, as the default target architecture might be unsupported
20+
# For example when building on linux-i386.
21+
tags = ["manual"],
1922
)
2023

2124
image_manifest(
@@ -37,6 +40,9 @@ def multiarch_go_image(name, binary):
3740
Label("//tools/platforms:linux_arm64"),
3841
],
3942
visibility = ["//visibility:public"],
43+
# Don't build container image unless explicitly requested, as
44+
# building all variants can be time-consuming.
45+
tags = ["manual"],
4046
)
4147

4248
def container_push_official(name, image, component):
@@ -46,4 +52,7 @@ def container_push_official(name, image, component):
4652
registry = "ghcr.io",
4753
repository = "buildbarn/" + component,
4854
tag_file = "@com_github_buildbarn_bb_storage//tools:stamped_tags",
55+
# Don't build container image unless explicitly requested, as
56+
# building all variants can be time-consuming.
57+
tags = ["manual"],
4958
)

0 commit comments

Comments
 (0)