title: Jenkins Global environment variables in Jenkinsfile
body: <p>How do I invoke Global environment variables in Jenkinsfile?<br>
  For example, if I have a variable - </p>
  
  <pre><code> name:credentialsId 
   value:xxxx-xxxx-xxxxx-xxxxxxxxx
  </code></pre>
  
  <p>How do I use it in the groovy script?</p>
  
  <p>I tried <code>${credentialsId}</code>, but it didn't work. It will just give error:</p>
  
  <pre><code>java.lang.NoSuchMethodError: No such DSL method '$' found among steps [ArtifactoryGradleBuild, ........
  </code></pre>