I am trying to access the bamboo build number in build.gradle but am unable to access it there. Following are the options I have tried so far inside build.gradle
:
System.getenv ()["bamboo.buildNumber"]
System.getenv ()["bamboo_buildNumber"]
project.hasProperty("bamboo_buildNumber")
project.hasProperty("bamboo_buildNumber")
I even tried creating a variable for my build plan with variable name as BUILD_NUMBER and variable value as ${bamboo.buildNumber}
and accessed it using the below methods, but the values are not getting accessed.
System.getenv ()["BUILD_NUMBER"]
project.hasProperty("BUILD_NUMBER")
I got the variable value using - System.getenv ()["bamboo_buildNumber"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With