Bazel plugin for TeamCity
Bazel is an interesting build tool for compiling large projects and it comes with build-ins for Java, C++, Python, etc. Some of our users are adopting Bazel and we received a few requests to support it in TeamCity.
Bazel plugin for TeamCity is now published in the plugin repository and could be installed as an additional TeamCity plugin. The plugin provides Bazel command build runner and integrates with the core functionality of TeamCity.
You will be able to see Bazel’s command output in the structured build log. The plugin also assists in capturing the test execution to provide test report and history of executions.
Also, some convenience features were added to make it easier to configure Bazel builds:
- Auto-discovery of build steps
- Bazel tool detection on build agents
- Bazel workspace caches cleaner
In addition to the build runner, the new plugin provides a build feature to configure the common startup options and the remote cache for Bazel builds.
Here’s a simple experiment with java-maven example. Running the “build” target for the project required approximately 17 seconds without the remote cache. Adding the remote cache to the build configuration resulted in 7 seconds build time.