title: dynamically replace branch name in jenkinsfile
body: <p>I am new to Jenkins, and stuck at replacing branch name in Jenkinsfile from Jenkins.</p>
  
  <p>I want to write a common Jenkinsfile, and in that I want to pick branch name from Jenkins. Below is the snippet from my Jenkinsfile</p>
  
  <blockquote>
    <p>checkout([$class: 'GitSCM', branches: [[name: '*/master']],</p>
  </blockquote>
  
  <p>Whatever the branch name I select from Jenkins, it should replace the same in Jenkinsfile and do the build.</p>
  
  <p>I have gone through the answers 
  <a href="https://stackoverflow.com/questions/32108380/jenkins-how-to-build-a-specific-branch">parametrized build</a></p>
  
  <p>Somewhat not able to do the same.
  Can anyone refer me to the doc/link which I can go through and implement the same?</p>
  
  <p>My Changes:</p>
  
  <pre><code>checkout([$class: 'GitSCM', branches: [[name: 'params.Branch_Select']],
  </code></pre>
  
  <p>enter image description here</p>
  
  <p><a href="https://i.stack.imgur.com/DDmhT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DDmhT.png" alt="GIT PARAMETER"></a></p>
  
  <p><a href="https://i.stack.imgur.com/jThYC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jThYC.png" alt="BRANCH SPECIFIER"></a></p>
  
  <p><a href="https://i.stack.imgur.com/d8YJ6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d8YJ6.png" alt="Jenkinsfile"></a></p>
  
  <p><a href="https://i.stack.imgur.com/oafAW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oafAW.png" alt="Error"></a></p>