I need to pass the username of the requestor of a build down to the script that is actually doing the work. Looking at the console output for a particular build, the first
The username isn't put in an easy-to-fetch environment variable, but you can get it using the xml (or json or python) api - as soon as you start a build, http://[jenkins-server]/job/[job-name]/[build-number]/api/xml is populated with details: