title: How to execute Jenkinsfile with gerrit trigger plugin for changeset in jenkins?
body: <p>We use gerrit-trigger in Jenkins, the build is triggered when a new changeset is pushed for review.</p>
  
  <p>Now we want to introduce pipeline and use solution <a href="https://jenkins.io/doc/book/pipeline/getting-started/#defining-a-pipeline-in-scm" rel="noreferrer">Defining a pipeline in scm</a></p>
  
  <p>Therefore we expect when the build is triggered, below pipeline plugin can work to checkout this refspec</p>
  
  <p><a href="https://i.stack.imgur.com/6HwyA.png" rel="noreferrer"><img src="https://i.stack.imgur.com/6HwyA.png" alt="enter image description here"></a> </p>
  
  <p>But the <code>${GERRIT_REFSPEC}</code> doesn't effect here, it checkouts the master still</p>
  
  <pre>
   > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
   > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
  Checking out Revision adf5d360582b1b24f088cfa8ac0f0ebf64a57692 (refs/remotes/origin/master)
  Commit message: "DO:CI End of summer"
   > git config core.sparsecheckout # timeout=10
   > git checkout -f adf5d360582b1b24f088cfa8ac0f0ebf64a57692
  </pre>
  
  <p>Any suggestion how it can work?</p>