title: Jenkins Pipeline: Get path of builds directory / Get values of config.xml
body: <p>I have a Jenkins multibranch pipeline which is polling periodically my svn for new commits.
  Running the pipeline, multiple log files are created which are saved in workspace directory (which will be cleaned for each new pipeline build). To save them durably I want to move the files to the builds directory of Jenkins where all build specific jenkins-logs, etc. are saved too.
  The default path in my file directory is:</p>
  
  <pre><code>...\${JENKINS_HOME}\jobs\*name-multibranch-job*\branches\*a-cryptic-name*\builds\*build-number*\
  </code></pre>
  
  <p>This path is specified in the file <code>...\${JENKINS_HOME}\config.xml</code> as</p>
  
  <pre><code>&lt;hudson&gt;
      ...
      &lt;buildsDir&gt;${ITEM_ROOTDIR}/builds&lt;/buildsDir&gt;
      ...
  &lt;/hudson&gt;
  </code></pre>
  
  <p>How can I access this value in my Pipeline script to move my log files via robocopy? The variables <code>${ITEM_ROOTDIR}</code> and <code>${ITEM_FULL_NAME}</code> (see <a href="https://wiki.jenkins.io/display/JENKINS/Features+controlled+by+system+properties" rel="nofollow noreferrer">https://wiki.jenkins.io/display/JENKINS/Features+controlled+by+system+properties</a>) are e.g. not recognized in pipeline script:</p>
  
  <pre><code>No such property: ITEM_FULL_NAME for class: WorkflowScript
  </code></pre>