Agent Side Plugins
I can't seem to find any source or documentation in TC3.1 for writing the agent-side plugins for build runners as referenced here: http://www.jetbrains.net/confluence/display/TCD3/Typical+Plugins#TypicalPlugins-WritingCustomBuildRunner
Where can I find documentation or source code for the jetbrains.buildServer.agent.BuildRunner interface?
Thanks,
Ray
Please sign in to leave a comment.
Hello Ray,
Full distribution of TeamCity (not war file) contains a devPackage directory with openAPI-source.jar file. It contains BuildRunner interface.
HTH,
KIR
I'm not finding the file in either the source or help jars from my build server's devPackage directory. Attached are the files that I have on my server.
Any other thoughts?
Thanks,
Ray
Edited by: Ray Navarette on Jun 23, 2008 5:10 PM
Looks like I can't get openAPI-help.jar to upload. Just so you know, there is not even a jetbrains.buildserver.agent package in this jar.
Edited by: Ray Navarette on Jun 23, 2008 5:12 PM
Attachment(s):
openApi-source.jar
Hello Ray,
That's my fault - I didn't notice that build runner openApi isn't available in our current OpenAPI packages.
What kind of runner do you want to implement?
Kind regards,
KIR
I'm looking into the possibility of extending the ANT runner to implement a newer way to run some of our tests from an older XML configuration driven test system. Is there any possibility of getting the complete sources from the openAPI?
Thanks,
Ray
Hello Ray,
There are chances you don't need a way to implement custom runner - TeamCity has a convenient way to report tests using stdout messages:
http://www.jetbrains.net/confluence/display/TCD3/BuildScriptInteractionwithTeamCity#BuildScriptInteractionwithTeamCity-testReporting
If your build system supports HTML/TEXT report generation, you can embed them to TeamCity without writing plugins:
http://www.jetbrains.net/confluence/display/TCD3/IncludingThird-PartyReportsintheBuildResults
Writing a custom runner (or extending Ant runner) is a tough task, and unfortunately, we don't have dedicated OpenAPI on agent side in
TeamCity 3.1 (there will be such API in Calcutta).
Hope this helps,
KIR
Thanks for the quick reply. I actually had already planned on using these mechanisms for reporting and displaying the results. The reason that I wanted to implement the runner though was to be able to simply specify the test control file for the build. The runner would set up the test framework and use the control file to set up the and run the tests.
Ray,
I suppose that you can specify such a test control file using a system property for the build or, if this requires some complicated issues, run some java program at the beginning of the build to perform required operations. The required input data can be passed as build configuration system properties, if needed.
Or you can wrap your whole test process in some java wrapper, which performs required operations. Again, there is no need to interact with TeamCity agent runtime - this can be written as a java task.
Does it make sense?
Regards,
KIR
Yeah, this approach should work, its just not as easy to set up (when creating a configuration) as I had hoped it would be. Again, thanks for all your help on this. I'll have into making a plugin when its supported in 4.0.
Meanwhile, you may want to edit the 3.x documentation to remove the part that says you can create custom build runners. :)
Thanks,
Ray