BUILD 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # Scripts runnable from make, e.g.
  2. #
  3. # cd $GOPATH/src/k8s.io/kubernetes
  4. # make test-e2e-node
  5. #
  6. # The sh_binary rules below exist only to validate
  7. # dependencies; if a shell dependency is accidentally
  8. # deleted, a presubmit BUILD will fail.
  9. #
  10. # If the scripts sourced their dependencies from
  11. # $RUNFILES (rather than $BASH_SOURCE/../.. or
  12. # whatever), then bazel build hack/... would install
  13. # runnable, hermetically sealed shell "binaries".
  14. # E.g. the following command would work:
  15. #
  16. # ./bazel-bin/hack/make-rules/test-e2e-node
  17. #
  18. # TODO(#47064): Should be a sh_test instead of sh_binary
  19. sh_binary(
  20. name = "test-cmd",
  21. srcs = ["test-cmd.sh"],
  22. deps = [
  23. "//hack/lib",
  24. "//test/cmd:legacy-script",
  25. ],
  26. )
  27. sh_binary(
  28. name = "test-e2e-node",
  29. srcs = ["test-e2e-node.sh"],
  30. deps = [
  31. "//hack/lib",
  32. ],
  33. )
  34. sh_binary(
  35. name = "test-integration",
  36. srcs = ["test-cmd.sh"],
  37. deps = [
  38. "//hack/lib",
  39. ],
  40. )
  41. sh_binary(
  42. name = "build",
  43. srcs = ["build.sh"],
  44. deps = [
  45. "//hack/lib",
  46. ],
  47. )
  48. sh_binary(
  49. name = "cross",
  50. srcs = ["cross.sh"],
  51. deps = [
  52. "//hack/lib",
  53. ],
  54. )
  55. sh_binary(
  56. name = "test",
  57. srcs = ["test.sh"],
  58. deps = [
  59. "//hack/lib",
  60. ],
  61. )
  62. sh_binary(
  63. name = "vet",
  64. srcs = ["vet.sh"],
  65. deps = [
  66. "//hack/lib",
  67. ],
  68. )
  69. sh_binary(
  70. name = "verify",
  71. srcs = ["verify.sh"],
  72. deps = [
  73. "//hack/lib",
  74. ],
  75. )
  76. filegroup(
  77. name = "package-srcs",
  78. srcs = glob(["**"]),
  79. tags = ["automanaged"],
  80. visibility = ["//visibility:private"],
  81. )
  82. filegroup(
  83. name = "all-srcs",
  84. srcs = [
  85. ":package-srcs",
  86. "//hack/make-rules/helpers/go2make:all-srcs",
  87. ],
  88. tags = ["automanaged"],
  89. visibility = ["//visibility:public"],
  90. )