title: Jenkins Post Build Task access jenkins environment variables like JOB_NAME
body: <p>I want to get the job details in Post Build Task plugin and pass the details to the batch/ powershell for further processing.</p>
  
  <p>I am not able to access the Jenkins environment variables like JOB_NAME, JOB_ID etc.</p>
  
  <p>In Post Build Plugin task</p>
  
  <p>Log text "BUILD SUCCESSFUL"
  OPTION </p>
  
  <p>Script Block:
  run.bat $JOB_NAME-$JOB_ID</p>
  
  <p>I need to pass the $JOB_NAME-$JOB_ID to the script. </p>