Awesome
TeamCity Bazel build support
<a href="https://teamcity.jetbrains.com/viewType.html?buildTypeId=TeamCityPluginsByJetBrains_TeamcityBazelPlugin_TeamCityBazelPlugin_MasterBuild&guest=1"><img src="https://teamcity.jetbrains.com/app/rest/builds/buildType:(id:TeamCityPluginsByJetBrains_TeamcityBazelPlugin_TeamCityBazelPlugin_MasterBuild)/statusIcon.svg" alt=""/></a>
TeamCity plugin to support projects based on Bazel build system.
Features
It provides the following features for bazel projects:
- Bazel tool detection on build agents
- Bazel command build runners
- Structured build log provider
- Auto-discovery of build steps
- Bazel tests reporter
- Cleaner of bazel workspace caches
- Bazel build feature to configure common startup options & remote cache
Download
You can download the plugin and install it as an additional TeamCity plugin.
Compatibility
The plugin is compatible with TeamCity 2018.1.x and greater.
Known issues
If IDEA can't resolve proto classes, like BuildEventStreamProtos
.
Here is how to resolve this:
- click Help
- Edit custom properties...
- and property idea.max.intellisense.filesize=999999
It increases max file size for coding assistance and design-time code inspection. You can find more information about these properties here: https://www.jetbrains.com/help/objc/configuring-file-size-limit.html
Run/debug integration tests locally
- Install bazelisk macOS:
brew install bazelisk
, Windows:choco install bazelisk
- Verify that
plugin-bazel-integration-tests/src/test/kotlin/jetbrains/bazel/integration/Environment.kt
has right path to the bazelisk - OPTIONAL: to debug BES server
- Uncomment
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005",
inplugin-bazel-integration-tests/src/test/kotlin/jetbrains/bazel/integration/BazelSteps.kt
- IntelliJ IDEA: Go to Run > Edit Configurations. Click the + button and select Remote JVM Debug. Set the port to 5005. Click OK. Attach to BES server for each integration test
- Uncomment
- Run tests with
./gradlew integration
or with IntelliJ IDEA Cucumber for Java Plugin
Configuration
The plugin relies on PATH
environment variable to detect installed bazel
tool version.
Build
This project uses gradle as the build system. You can easily open it in IntelliJ IDEA or Eclipse.
Contributions
We appreciate all kinds of feedback, so please feel free to send a PR or submit an issue.