From 64ca9decaefcd7bc868e692827e3ba7ff333836d Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Wed, 19 Oct 2016 18:32:33 -0700 Subject: [PATCH] add some docs about building with bazel --- docs/devel/bazel.md | 72 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 docs/devel/bazel.md diff --git a/docs/devel/bazel.md b/docs/devel/bazel.md new file mode 100644 index 00000000000..2c321a905f7 --- /dev/null +++ b/docs/devel/bazel.md @@ -0,0 +1,72 @@ + + + + +WARNING +WARNING +WARNING +WARNING +WARNING + +

PLEASE NOTE: This document applies to the HEAD of the source tree

+ +If you are using a released version of Kubernetes, you should +refer to the docs that go with that version. + +Documentation for other releases can be found at +[releases.k8s.io](http://releases.k8s.io). + +-- + + + + + +# Build with Bazel + +Building with bazel is currently experimental. Automanaged BUILD rules have the +tag "automanaged" and are maintained by +[gazel](https://github.com/mikedanese/gazel). Instructions for installing bazel +can be found [here](https://www.bazel.io/versions/master/docs/install.html). + +To build docker images for the components, run: + +``` +$ bazel build //build/... +``` + +To run many of the unit tests, run: + +``` +$ bazel test //cmd/... //build/... //pkg/... //federation/... //plugin/... +``` + +To update automanaged build files, run: + +``` +$ ./hack/update-bazel.sh +``` + + +To update a single build file, run: + +``` +$ # get gazel +$ go get -u github.com/mikedanese/gazel +$ # .e.g. ./pkg/kubectl/BUILD +$ gazel ./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](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/devel/bazel.md?pixel)]() +