It seems that, when doing a build promotion in Jenkins using the Promoted Builds Plugin, it generates a new BUILD_ID environment variable. Is there a way, or a plugin that lets you access the current BUILD_ID of the build you are trying to promote?
Basically, the functionality I need is to: Navigate to a build in Jenkins, be able to launch an ant or gradle script to promote an already built artifact that is archived under the build I'm currently in.