title: How does currentBuild get associated with the RunWrapper Object?
body: <p>In my pipeline script I can access the current Build by using the currentBuild field. For Example,</p>
  
  <pre><code>node('remote'){
    println currentBuild.getId()
    println currentBuild.rawBuild
  }
  </code></pre>
  
  <p>I assume that currentBuild refers to the RunWrapper Object and currentBuild.rawBuild refers to current Run object.</p>
  
  <p>My question is, how does currentBuild get associated with the RunWrapper Class? Is there any way to directly access the RunWrapper Object other than through these fields?</p>