kubernetes/docs/devel/bazel.md
Kubernetes Submit Queue 18b888b32d Merge pull request #36699 from k82cn/update_bazel
Automatic merge from submit-queue

Added comments on running update-bazel.sh in "$GOPATH/src/k8s.io/kubernetes"

**What this PR does / why we need it**:

This path made `hack/update-bazel.sh` to accept `$GOPATH` with multiple path.
2016-11-28 11:43:45 -08:00

1.2 KiB

Build with Bazel

Building with bazel is currently experimental. Automanaged BUILD rules have the tag "automanaged" and are maintained by gazel. Instructions for installing bazel can be found here.

To build docker images for the components, run:

$ bazel build //build-tools/...

To run many of the unit tests, run:

$ bazel test //cmd/... //build-tools/... //pkg/... //federation/... //plugin/...

To update automanaged build files, run:

$ ./hack/update-bazel.sh

NOTES: update-bazel.sh only works if check out directory of Kubernetes is "$GOPATH/src/k8s.io/kubernetes".

To update a single build file, run:

$ # get gazel
$ go get -u github.com/mikedanese/gazel
$ # .e.g. ./pkg/kubectl/BUILD
$ gazel -root="${YOUR_KUBE_ROOT_PATH}" ./pkg/kubectl

Updating BUILD file for a package will be required when:

  • Files are added to or removed from a package
  • Import dependencies change for a package

Analytics