In Jenkins/Hudson, with the help of a Postbuild Groovy script, I would like to get one of the following:
${manager.build.getEnvironment(manager.listener)['BUILD_NUMBER'] }