How to put conditional value into a Build Parameter
I want to set the value of an Environment parameter (e.g. %env.Configuration% ) based on the teamcity.build.triggeredBy variable.
When the triggeredBy = "Schedule" I want the Configuration parameter to be set to "Debug"
I know how to use one variable/parameter in the value of another parameter.
Is there a conditional clause like
%teamcity.build.triggeredBy% == 'Schedule' :? 'Debug' : 'Release'
that I can put into the value?
Please sign in to leave a comment.
Hi Brian,
It is not possible to add condition into build parameter. Please feel free to create feature request in our tracker.
Also you can create a custom plugin, for example see Web Parameters plugin.
Interested users also could see the related forum thread.
Is there any update on this feature request since 2014? thanks!
Hello,
On newer versions one can use service messages to report a new value for the build parameter:
Please let me know if this helps.