Goal: Learn the fundamentals of Bazel. Get oriented to the repository structure, how to configure Bazel for your source code, and try out some basic commands like build
, run
, and test
.
This course is updated in January 2025 and covers Bazel 8.
Outline
Introduction
Touches on what Bazel is and what advantages it has over alternatives.
By the end of this section, you will be able to explain to a co-worker why your organization chose to use it, and should have Bazel installed so you can run bazel version
.
Project Structure
Bazel has some terminology and conventions for which files must appear.
Create a repositoryBazel Modules (MODULE.bazel)FlagsConfiguring the Build
To configure Bazel, you need to author BUILD
files, and sometimes improve how they are written.
Running Tests
Now that you are able to build the code, you should figure out if it's working.
By the end of this section, you'll have used bazel test
to run some automated tests for the language you picked.
FAQ / Q&A
Please ask any questions we haven't already answered!
This section is only covered in instructor-led training, and isn’t recorded.
- Common error messages