BUILD 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. load("@io_bazel_rules_docker//container:container.bzl", "container_layer")
  2. load("//build:platforms.bzl", "SERVER_PLATFORMS")
  3. load("//build:container.bzl", "multi_arch_container")
  4. container_layer(
  5. name = "cluster-srcs",
  6. data_path = "/",
  7. directory = "/kubernetes",
  8. files = ["//cluster:all-srcs"],
  9. )
  10. container_layer(
  11. name = "bins",
  12. directory = "/usr/local/bin",
  13. files = [
  14. "//cmd/kubectl",
  15. "//test/e2e:e2e.test_binary",
  16. "//vendor/github.com/onsi/ginkgo/ginkgo",
  17. ],
  18. )
  19. multi_arch_container(
  20. name = "conformance",
  21. architectures = SERVER_PLATFORMS["linux"],
  22. base = "@debian-hyperkube-base-{ARCH}//image",
  23. cmd = [
  24. "/bin/bash",
  25. "-c",
  26. "/run_e2e.sh",
  27. ],
  28. # {ARCH} is replaced by the macro, but STABLE_ vars are replaced by the
  29. # build stamping, so we need to escape them
  30. docker_push_tags = ["{{STABLE_DOCKER_PUSH_REGISTRY}}/conformance-{ARCH}:{{STABLE_DOCKER_TAG}}"],
  31. docker_tags = ["{{STABLE_DOCKER_REGISTRY}}/conformance-{ARCH}:{{STABLE_DOCKER_TAG}}"],
  32. env = {
  33. "E2E_FOCUS": "\[Conformance\]",
  34. "E2E_SKIP": "",
  35. "E2E_PARALLEL": "1",
  36. "E2E_PROVIDER": "local",
  37. "RESULTS_DIR": "/tmp/results",
  38. "KUBECONFIG": "",
  39. },
  40. files = [
  41. ":run_e2e.sh",
  42. ],
  43. layers = [
  44. ":cluster-srcs",
  45. ":bins",
  46. ],
  47. stamp = True,
  48. tags = ["manual"],
  49. visibility = ["//visibility:public"],
  50. workdir = "/usr/local/bin",
  51. )
  52. filegroup(
  53. name = "package-srcs",
  54. srcs = glob(["**"]),
  55. tags = ["automanaged"],
  56. visibility = ["//visibility:private"],
  57. )
  58. filegroup(
  59. name = "all-srcs",
  60. srcs = [":package-srcs"],
  61. tags = ["automanaged"],
  62. visibility = ["//visibility:public"],
  63. )