title: How can I access Jenkins build artifacts from the groovy Postbuild plugin?
body: <p>Is there a way to read a build artifact file using the Groovy postbuild plugin?</p>
  
  <p><strong>Some context:</strong>
  I have written some testng tests that are run by maven in Jenkins.  Jenkins runs the tests, gives me the test results, etc.  However, I have been asked to also store the results in HP's Application Lifeycycle Management (ALM).  A coworker provided me with a post-build groovy script that can interface with ALM and store the test results.  I have to pass these parameters to that script: </p>
  
  <ul>
  <li>jobname</li>
  <li>pass/fail status</li>
  <li>test start time  </li>
  </ul>
  
  <p>My idea was to store testng-results.xml as an artifact and parse out the results with xmlslurper, but I don't know how to read the artifact from the groovy plugin.  From the <a href="https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds" rel="nofollow">groovy postbuild plugin page</a> I have gathered that it might also be possible to read the test results directly from the manager.build variable, but I don't have a lot of experience with Jenkins or this plugin and so far I have been unsuccessful.</p>
  
  <p>I'm also open to other approaches as well.  The groovy script is running on the Jenkins server, not on the slave node.</p>