Determining Teamcity version in agent plugin

I'm working on a plugin where I would like to record the teamcity version.

from the server side, I figured (though havn't finished testing) that I can access the version by:

sBuildServer.getFullServerVersion()

But I haven't yet found any way to do this from the agent side. Can I get pointed in the right direction?

In addition, is there a better, possibly constant way to just get the simple version number or build number? (just "9.1.5" or "37377")

2 comments
Official comment

Hi Gavin,

Usually agent have same version as server except when build still running on agent but server was updated (agent would update once build finished).

So in both agent and server parts of plugin you could simply use 

ServerVersionHolder.getVersion()

 

If possible, I'm happy enough to pass or pull the data from the main side to the agent side. I just don't know how yet.

0

Please sign in to leave a comment.