In Hudson – Get Project Specific Environment Variables

Interestingly I was able to get the environment variables for a build which could be useful for others that need to be able to get at the Hudson specific environment variables:

def job = hudson.model.Hudson.instance.getItem("JobToGet")
def envVars="envVars")
println envVars["ANT_OPTS"]

Leave a Reply

Your email address will not be published. Required fields are marked *