kubernetes/cluster/images/conformance/BUILD
Mike Danese d182ecc1f9 output go_binary rule directly from go_binary_conditional_pure
And same for go_test_conditional_pure.

Instead of aliasing. Aliases are annoying in a number of ways. This is
specifically bugging me now because they make the action graph harder to
analyze programmatically. By using aliases here, we would need to handle
potentially aliased go_binary targets and dereference to the effective
target.

The comment references an issue with `pure = select(...)` which appears
to be resolved considering this now builds.
2020-09-11 13:19:37 -07:00

73 lines
1.8 KiB
Python

load("@io_bazel_rules_docker//container:container.bzl", "container_layer")
load("//build:platforms.bzl", "SERVER_PLATFORMS")
load("//build:container.bzl", "multi_arch_container")
container_layer(
name = "cluster-srcs",
data_path = "/",
directory = "/kubernetes",
files = ["//cluster:all-srcs"],
)
container_layer(
name = "bins",
directory = "/usr/local/bin",
files = [
"//cluster/images/conformance/go-runner",
"//cmd/kubectl",
"//test/e2e:e2e.test",
"//vendor/github.com/onsi/ginkgo/ginkgo",
],
)
multi_arch_container(
name = "conformance",
architectures = SERVER_PLATFORMS["linux"],
base = "@debian-base-{ARCH}//image",
cmd = [
"/bin/bash",
"-c",
"/run_e2e.sh",
],
# {ARCH} is replaced by the macro, but STABLE_ vars are replaced by the
# build stamping, so we need to escape them
docker_push_tags = ["{{STABLE_DOCKER_PUSH_REGISTRY}}/conformance-{ARCH}:{{STABLE_DOCKER_TAG}}"],
docker_tags = ["{{STABLE_DOCKER_REGISTRY}}/conformance-{ARCH}:{{STABLE_DOCKER_TAG}}"],
env = {
"E2E_FOCUS": "\\[Conformance\\]",
"E2E_SKIP": "",
"E2E_PARALLEL": "1",
"E2E_PROVIDER": "local",
"RESULTS_DIR": "/tmp/results",
"KUBECONFIG": "",
},
files = [
":run_e2e.sh",
],
layers = [
":cluster-srcs",
":bins",
],
stamp = True,
tags = ["manual"],
visibility = ["//visibility:public"],
workdir = "/usr/local/bin",
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//cluster/images/conformance/go-runner:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)