Build parameter referencing

Answered

Hi, is it possible to reference build parameters in agent requirements?

I'd like to reference a build parameter such as 'tool.version' to a 'system.tool.available_versions' to make sure my agent has the needed version for this specific tool.

Cheers

0
3 comments

Hello Dorian,

Yes, it is! Please find an example below:



In this case, I have added a requirement for the system.agent.home.dir agent parameter to be equal to a build parameter myParamValue set to match the left side agent; k8-linux does not met this requirement, and you can see the resolved value on the UI as well. 

0

That's perfect thanks! I was trying to do it the other way around, on the myParamValue instead of the system parameter.

Would be nice to have parameter completion in the value box.

Thanks!

0

Hello Dorian,

Glad to hear it was helpful, you are most welcome!
As I can see, parameter completion could clutter the interface somewhat (TeamCity already tries to fetch possible values for some of the parameters like system.agent.name); if build parameters would also be on the list this could be non-trivial. However, please mind you could create a feature request at any moment here.

0

Please sign in to leave a comment.