summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKubernetes Prow Robot <k8s-ci-robot@users.noreply.github.com>2019-08-06 14:14:50 -0700
committerGitHub <noreply@github.com>2019-08-06 14:14:50 -0700
commit2e3b8066f2038561e6d8cfeddbe987c627d445ff (patch)
tree2c96561e6d63f9ece434a865f681bd3409444781
parent7f857b125eea2d8e2548cd406a824e581bc0e77f (diff)
parentb1b1be83d7c77200c9f6e02a4f6f87b7e519ff7a (diff)
Merge pull request #3738 from praseodym/bazel-python2
Add instructions to configure Bazel for Python 2
-rw-r--r--contributors/devel/sig-testing/bazel.md22
1 files changed, 13 insertions, 9 deletions
diff --git a/contributors/devel/sig-testing/bazel.md b/contributors/devel/sig-testing/bazel.md
index 6916c0be..4047a54f 100644
--- a/contributors/devel/sig-testing/bazel.md
+++ b/contributors/devel/sig-testing/bazel.md
@@ -2,22 +2,20 @@
Building and testing Kubernetes with Bazel is supported but not yet default.
-Bazel is used to run all Kubernetes PRs on [Prow](https://prow.k8s.io),
+Bazel is used to run all Kubernetes PRs on [Prow],
as remote caching enables significantly reduced build and test times.
Some repositories (such as kubernetes/test-infra) have switched to using Bazel
exclusively for all build, test, and release workflows.
-Go rules are managed by the [`gazelle`](https://github.com/bazelbuild/rules_go/tree/master/go/tools/gazelle)
-tool, with some additional rules managed by the [`kazel`](https://git.k8s.io/repo-infra/kazel) tool.
+Go rules are managed by the [`gazelle`][gazelle]
+tool, with some additional rules managed by the [`kazel`][kazel] tool.
These tools are called via the `hack/update-bazel.sh` script.
-Instructions for installing Bazel
-can be found [here](https://www.bazel.io/versions/master/docs/install.html).
-Please note that until [this Bazel
-issue](https://github.com/bazelbuild/rules_docker/issues/454) is fixed,
-`/usr/bin/env python` must be python2 in order for all the Bazel commands listed
-below to succeed.
+Instructions for installing Bazel can be found [here][bazel-install].
+Note that older Bazel versions did not work with Python 3, so we recommend
+using version 0.27.0 or newer. If you still have Python-related problems,
+please take a look at [this FAQ][bazel-python-faq].
Several convenience `make` rules have been created for common operations:
@@ -37,6 +35,12 @@ tests, run
$ bazel test //pkg/kubectl/...
```
+[Prow]: https://prow.k8s.io
+[bazel-install]: https://www.bazel.io/versions/master/docs/install.html
+[kazel]: https://git.k8s.io/repo-infra/kazel
+[gazelle]: https://github.com/bazelbuild/rules_go/tree/master/go/tools/gazelle
+[bazel-python-faq]: https://github.com/bazelbuild/bazel/issues/7899
+
## Planter
If you don't want to install Bazel, you can instead try using the unofficial
[Planter](https://git.k8s.io/test-infra/planter) tool,