Have you ever seen a detailed description on how parameter references are getting resolved on build agent? You may find Agent Parameters Story post helpful.
There is an update. Starting from recent TeamCity 7.1 EAP build it will be possible to call jetbrains.buildServer.agent.BuildRunnerContext#getConfigParameters method to get build step (BuildRunnerContext) specific config parameters.
Now we have jetbrains.buildServer.agent.BuildRunnerContext#getConfigParameters and jetbrains.buildServer.agent.AgentRunningBuild#getSharedConfigParameters methods.
On the server-side, we changed jetbrains.buildServer.serverSide.SRunnerContext#addBuildParameter to allow adding configuration parameters there too. So in plugin you are now able to add (or update) configuration parameter for a particular step (BuildRunnerContext).
Build runner plugin on agent should avoid calling AgentRunningBuild#getShared* methods and prefer to fetch parameters from build step context(BuildRunnerContext). It's recommended to use BuildRunnerContext where possible.
There is nothing to change if you use jetbrains.buildServer.agent.runner.BuildServiceAdapter to implement your build runner. getConfigParameters method of the adapter now changed to return config parameters of a step.
comments powered by Disqus