I am trying to access the bamboo build number in build.gradle, but I cannot access it. Below are the options that 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 to create a variable for my build plan with the variable name BUILD_NUMBER and the variable value as ${bamboo.buildNumber} and accessed it using the methods described below, but the values ββdid not work out.
System.getenv ()["BUILD_NUMBER"] project.hasProperty("BUILD_NUMBER")
source share