title: jenkins pipeline using different nodes for different stages
body: <p>I am trying to run different stages on different nodes in my jenkins pipeline like stage 1 is checkout, stage 2 is build, stage 3 unit testing. 
  For example :</p>
  
  <pre><code>node ('linux1')
  {
  stage ('checkout')
  ..........
  }
  
  node ('linux2')
  {
  stage ('build')
  ........
  }
  
  
  node ('linux3')
  {
  stage ('unit testing')
  ...........
  }
  </code></pre>
  
  <p>If I try to do this, my question is if I checkout code in Linux1 node, how come the other stages can run in different node while the checked out code is in node1. </p>
  
  <p>How the code will be distributed and if my understanding is not correct, how can I achieve parallelism and ensure each stage can parallel and reduce time.</p>
  
  <p>If possible, Please suggest any groovy pipeline documentation for writing Jenkins pipelines.</p>