title: Jenkins Declarative Pipeline: How to inject properties
body: <p>I have Jenkins 2.19.4 with Pipeline: Declarative Agent API 1.0.1. How does one use readProperties if you cannot define a variable to assign properties read to?</p>
  
  <p>For example, to capture SVN revision number, I currently capture it with following in Script style:</p>
  
  <p>```</p>
  
  <pre><code>echo "SVN_REVISION=\$(svn info ${svnUrl}/projects | \
  grep Revision | \
  sed 's/Revision: //g')" &gt; svnrev.txt
  </code></pre>
  
  <p>```</p>
  
  <pre><code>def svnProp = readProperties file: 'svnrev.txt'
  </code></pre>
  
  <p>Then I can access using:</p>
  
  <pre><code>${svnProp['SVN_REVISION']}
  </code></pre>
  
  <p>Since it is not legal to def svnProp in Declarative style, how is readProperties used?</p>