BUILD 1.8 KB

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