I have a jenkinsfile in my repo that checksout 3 branches:
dir ("temp_pn" ) {
checkout([$class: 'GitSCM',
branches: [[name: "${pn_selected_branch_or_tag}"]],
userRemoteConfigs: [[credentialsId: 'omer_creds', url: "https://Omeresh@bitbucket.org/AmichaiHerman/python-ml.git"]]])
}
dir ("temp_pn2" ) {
checkout([$class: 'GitSCM',
branches: [[name: "${pn2_selected_branch_or_tag}"]],
userRemoteConfigs: [[credentialsId: 'omer_creds', url: "https://Omeresh@bitbucket.org/AmichaiHerman/python-ml.git"]]])
}
dir ("temp_predictor" ) {
checkout([$class: 'GitSCM',
branches: [[name: "${predictor_selected_branch_or_tag}"]],
userRemoteConfigs: [[credentialsId: 'omer_creds', url: "https://Omeresh@bitbucket.org/AmichaiHerman/python-ml.git"]]])
}
The job fails when it reaches the third branch with "ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job." When i try to run the SAME job from the pipeline in the gui (not jenkinsfile from git) it works fine.
I even tried to swap the order of branches i'm trying to checkout to see if the problem is with the last one, and it just fails at the third checkout, regardless of the branch it tries to checkout.
Any suggestions on what could be the issue? THNX!