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
user30997
Please check out Jenkins Build User Vars plugin, it does what you need:
It is used to set following user build variables: