In Jenkins/Hudson, with the help of a Postbuild Groovy script, I would like to get one of the following:
The only way I got it to work for me was with build.properties.environment.BUILD_NUMBER
build.properties.environment.BUILD_NUMBER