Skip to content

Commit 4e801e0

Browse files
committed
Ensure that the pusher binary is not built for the target platform
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent fc7bb3e commit 4e801e0

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/container/push.bzl b/container/push.bzl
2+
index baef9c2..942741d 100644
3+
--- a/container/push.bzl
4+
+++ b/container/push.bzl
5+
@@ -205,7 +205,7 @@ container_push_ = rule(
6+
),
7+
"_pusher": attr.label(
8+
default = "//container/go/cmd/pusher",
9+
- cfg = "target",
10+
+ cfg = "host",
11+
executable = True,
12+
allow_files = True,
13+
),
14+
diff --git a/contrib/push-all.bzl b/contrib/push-all.bzl
15+
index c7e7f72..fd6518b 100644
16+
--- a/contrib/push-all.bzl
17+
+++ b/contrib/push-all.bzl
18+
@@ -126,7 +126,7 @@ container_push = rule(
19+
),
20+
"_pusher": attr.label(
21+
default = Label("//container/go/cmd/pusher"),
22+
- cfg = "target",
23+
+ cfg = "host",
24+
executable = True,
25+
allow_files = True,
26+
),

bazel/repositories.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def _pl_deps():
253253
_bazel_repo("rules_foreign_cc")
254254
_bazel_repo("io_bazel_rules_k8s")
255255
_bazel_repo("io_bazel_rules_closure")
256-
_bazel_repo("io_bazel_rules_docker", patches = ["//bazel/external:rules_docker.patch", "//bazel/external:rules_docker_arch.patch"], patch_args = ["-p1"])
256+
_bazel_repo("io_bazel_rules_docker", patches = ["//bazel/external:rules_docker.patch", "//bazel/external:rules_docker_arch.patch", "//bazel/external:rules_docker_pusher_cfg.patch"], patch_args = ["-p1"])
257257
_bazel_repo("rules_python")
258258
_bazel_repo("rules_pkg")
259259
_bazel_repo("com_github_bazelbuild_buildtools")

0 commit comments

Comments
 (0)