Is there a way to get the jobname for the current build in jenkins and pass it as a parameter to an ant build script?
A similar issue, I was looking for job name for shell script.
In the 'Execute shell' > 'Command' textbox, both the below worked for me:
echo $JOB_NAME echo "$JOB_NAME"