How to get value of Configuration parameter in teamcity using Gradle?

I have been trying to get the value of configuration parameter since yesterday but no luck. On the documentation I can call it using this teamcity["<property name>"] but it wont work.

Say I have a configuration parameter called "isPaid". I want to get the "isPaid" param value in my gradle. How can I do that? Shouldn't that be

System.getProperty("teamcity[isPaid]")

Tried using both getProperty and getEnv but still did not work. Any ideas? Thanks

0
1 comment

Hi,

 

You shouldn't need to call the System.getProperty: https://www.jetbrains.com/help/teamcity/gradle.html#Gradle-Buildproperties

The docs even have a couple examples of how it works. If you have regular configuration parameters, you will need to ensure that they are of the system type, as regular configuration parameters aren't passed to the runners: https://www.jetbrains.com/help/teamcity/configuring-build-parameters.html#ConfiguringBuildParameters-TypesofBuildParameters

 

Can you check if that works for you?

0

Please sign in to leave a comment.