Maven Build Progress With TeamCity Service Messages
Join the DZone community and get the full member experience.
Join For FreeLuckily, TeamCity allows your build script to interact with the server using Service Messages. When you build script prints out the following command, TeamCity reads it and behaves accordingly.
This way it is possible to report a compilation or testing results, publish artifacts (you can find "##teamcity[publishArtifacts" messages in IntelliJ IDEA build log), and even update build parameters on the fly. However, what I was interested in is build progress report:
Adding a single println to a Maven build can be done with a bit of Groovy scripting:
After adding this snippet to project's parent POM, the progress indicator becomes (see it live!)
And I'm now working on making this functionality built-in for TeamCity 7.1.
Same trick can be used in Gradle, but it is less required since TeamCity already reports Gradle tasks progress. Anyway, if you're interested, grab this code:
Published at DZone with permission of Evgeny Goldin, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments