Using Groovy scripting and the Groovy Plugin you can do this:
[source gutter=”0″ light=”1″ collapse=”0″ language=”groovy”]
def job = Hudson.instance.getJob(‘CoolJob’)
def run = job.getLastBuild()
If you just
println run.getEnvironment(), you’ll see the whole list of environment variables in the build. These include any parameters for a parameterized job. To test this, I used the script console. I plan on using this to tag a successful milestone or release (ivy “status” that is) build in Jenkins. Now, I’m sure there is a way to get the SCM download url used for the Subversion checkout, that post will hopefully come soon.