Is there any integration between TeamCity and Bazel?
We are looking for moving from Maven to Bazel, is there any articles about integration between Teamcity and bazel? are you planning to add native plugin as for a Maven, Gradle, etc.
Please sign in to leave a comment.
Hi Pavel,
as of now, we don't have any official plans for it. If you would like to see explicit support, please feel free to open a request in our tracker here: https://youtrack.jetbrains.com/issues/TW
In the meantime, as their own FAQ states, their command line returns non-0 when it fails, so it should be possible to use it with a command line runner.
Also there is the possibility of third party plugins, or building your own.
There is an experimental Bazel build support plugin: https://github.com/JetBrains/teamcity-bazel-plugin
Thanks! I will check it out!
Hello Pavel,
Did you tried using the TeamCity bazel integration? In the latest plugin builds were fixed some found problems, so it make sense to update plugin to the latest version.
Hi Dmitry,
my apologies that didn't return to you till now. We trying plugin and it's working, but I have question about environment variables. In the most test runners env. vars from the build propagated and available from the code, but bazel has a limitation out of the box, and now you need actually duplicate all env. vars declaration inside build step. Is there plans to make all variables from build configuration available from plugin side?
Cheers,
Pavel
Hi Pavel, thanks for feedback.
Could you please file an issue in our tracker to support environment variables propagation and we'll try to implement it?
Hello Dmitry,
Here is our issue regarding env. vars https://youtrack.jetbrains.com/issue/TW-59602
We tried to use the plugin. It works almost fine, but we found some problems in our case. We decided not to use it for now and use the command line step to run bazel.
The first problem is that plugin collects test results from test.xml file and this can not be disabled. But our tests report statuses with service messages. As a result TC shows each test twice in the report.
Another problem is that plugin reads log file (with service messages) after all tests finished, not in realtime. It is a problem for slow UI tests.
Also reported test duration is zero but it can be fixed adding timestamps to service messages.
If add "--test_output=streamed" argument, TC prints test output in realtime (with some buffering on bazel side), but TC ignores service messages (parses only if verbosity level is Diagnostic).
We will follow the development of the plugin and we will start using it as soon as it fits our case.