I am new to Jenkins, and stuck at replacing branch name in Jenkinsfile from Jenkins.
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
checkout([$class: 'GitSCM', branches: [[name: '*/master']],
Whatever the branch name I select from Jenkins, it should replace the same in Jenkinsfile and do the build.
I have gone through the answers parametrized build
Somewhat not able to do the same. Can anyone refer me to the doc/link which I can go through and implement the same?
My Changes:
checkout([$class: 'GitSCM', branches: [[name: 'params.Branch_Select']],
enter image description here