Near the top of my build console I see a \"Last Built Revision:\" w/ a revision #. How can I access this last built rev # in my build script? I\'m using Gradle, but I don\'t t
You can directly access the Jenkins BUILD_NUMBER as system environment variable.
BUILD_NUMBER
task getBuildNumber << { ext.env = System.getenv() ext.buildNumber = env.BUILD_NUMBER?.toInteger() println "Build Number: $buildNumber" }