-
Bug
-
Resolution: Incomplete
-
Major
-
Jenkins 2.249.1
Git plugin 4.4.1
Pipeline: SCM Step 2.11
CentOS 7 x86_64 (master and slaves)
OpenJDK 1.8 (master and slaves)
Slaves are launched via SSH
Greetings,
We have issues with Git Plugin 4.4 and multibranch pipelines, as scm.branches now points to the PR number and not to the actual branch name of the PR. E.g. we used the following snippet earlier:
checkout([ $class: 'GitSCM', branches: scm.branches, userRemoteConfigs: [[ credentialsId: 'foo', url : 'git@github.com:foo/bar.git' ]], extensions : [[ $class: 'CloneOption', noTags: false, shallow: false ]] ])
Now, as scm.branches has e.g. '[PR-1234]' value instead of '[branch-name]', build fails with the ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Issue was verified with 1 GitHub repository, cannot reproduce with BitBucket.
Also, I couldn't find out why build proceeds when adding scm.extensions (like on the snippet below), which wasn't required before:
checkout([ $class: 'GitSCM', branches: scm.branches, userRemoteConfigs: [[ credentialsId: 'foo', url : 'git@github.com:foo/bar.git' ]], extensions : scm.extensions + [[ $class: 'CloneOption', noTags: false, shallow: false ]] )]
[JENKINS-63653] scm.branches points to a wrong branch name with Git Plugin 4.4 and multibranch pipeline
Description |
Original:
Greetings, We have issues with Git Plugin 4.4 and multibranch pipelines, as *{{scm.branches}}* now points to the PR number and not to the actual branch name of the PR. E.g. we used the following snippet earlier: {code:java} checkout([ $class: 'GitSCM', branches: scm.branches, userRemoteConfigs: [[ credentialsId: 'foo', url : 'git@github.com:foo/bar.git' ]], extensions : [[ $class: 'CloneOption', noTags: false, shallow: false ]] ]) {code} Now, as *{{scm.branches}}* has e.g. '[PR-1234]' value instead of '[branch-name]', build fails with the *{{ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.}}* Verified with 1 GitHub repository, cannot reproduce with BitBucket. Also, I couldn't find out why build proceeds when adding *{{scm.extensions}}*{{ (like on the snippet below)}}{{, which wasn't required before}}*{{}}*: {code:java} checkout([ $class: 'GitSCM', branches: scm.branches, userRemoteConfigs: [[ credentialsId: 'foo', url : 'git@github.com:foo/bar.git' ]], extensions : scm.extensions + [[ $class: 'CloneOption', noTags: false, shallow: false ]] )] {code} |
New:
Greetings, We have issues with Git Plugin 4.4 and multibranch pipelines, as *{{scm.branches}}* now points to the PR number and not to the actual branch name of the PR. E.g. we used the following snippet earlier: {code:java} checkout([ $class: 'GitSCM', branches: scm.branches, userRemoteConfigs: [[ credentialsId: 'foo', url : 'git@github.com:foo/bar.git' ]], extensions : [[ $class: 'CloneOption', noTags: false, shallow: false ]] ]) {code} Now, as *{{scm.branches}}* has e.g. '[PR-1234]' value instead of '[branch-name]', build fails with the *{{ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.}}* Issue was verified with 1 GitHub repository, cannot reproduce with BitBucket. Also, I couldn't find out why build proceeds when adding *{{scm.extensions}}* (like on the snippet below){{, which wasn't required before}}**: {code:java} checkout([ $class: 'GitSCM', branches: scm.branches, userRemoteConfigs: [[ credentialsId: 'foo', url : 'git@github.com:foo/bar.git' ]], extensions : scm.extensions + [[ $class: 'CloneOption', noTags: false, shallow: false ]] )] {code} |
Environment |
Original:
Jenkins 2.249.1 Git plugin 4.4.1 Pipeline: SCM Step 2.11 CentOS 7 x86_64 (master and slaves) JDK 1.8 (master and slaves) Slaves are launched via SSH |
New:
Jenkins 2.249.1 Git plugin 4.4.1 Pipeline: SCM Step 2.11 CentOS 7 x86_64 (master and slaves) OpenJDK 1.8 (master and slaves) Slaves are launched via SSH |
Description |
Original:
Greetings, We have issues with Git Plugin 4.4 and multibranch pipelines, as *{{scm.branches}}* now points to the PR number and not to the actual branch name of the PR. E.g. we used the following snippet earlier: {code:java} checkout([ $class: 'GitSCM', branches: scm.branches, userRemoteConfigs: [[ credentialsId: 'foo', url : 'git@github.com:foo/bar.git' ]], extensions : [[ $class: 'CloneOption', noTags: false, shallow: false ]] ]) {code} Now, as *{{scm.branches}}* has e.g. '[PR-1234]' value instead of '[branch-name]', build fails with the *{{ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.}}* Issue was verified with 1 GitHub repository, cannot reproduce with BitBucket. Also, I couldn't find out why build proceeds when adding *{{scm.extensions}}* (like on the snippet below){{, which wasn't required before}}**: {code:java} checkout([ $class: 'GitSCM', branches: scm.branches, userRemoteConfigs: [[ credentialsId: 'foo', url : 'git@github.com:foo/bar.git' ]], extensions : scm.extensions + [[ $class: 'CloneOption', noTags: false, shallow: false ]] )] {code} |
New:
Greetings, We have issues with Git Plugin 4.4 and multibranch pipelines, as *{{scm.branches}}* now points to the PR number and not to the actual branch name of the PR. E.g. we used the following snippet earlier: {code:java} checkout([ $class: 'GitSCM', branches: scm.branches, userRemoteConfigs: [[ credentialsId: 'foo', url : 'git@github.com:foo/bar.git' ]], extensions : [[ $class: 'CloneOption', noTags: false, shallow: false ]] ]) {code} Now, as *{{scm.branches}}* has e.g. '[PR-1234]' value instead of '[branch-name]', build fails with the *{{ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.}}* Issue was verified with 1 GitHub repository, cannot reproduce with BitBucket. Also, I couldn't find out why build proceeds when adding *{{scm.extensions}}* (like on the snippet below){{, which wasn't required before}}: {code:java} checkout([ $class: 'GitSCM', branches: scm.branches, userRemoteConfigs: [[ credentialsId: 'foo', url : 'git@github.com:foo/bar.git' ]], extensions : scm.extensions + [[ $class: 'CloneOption', noTags: false, shallow: false ]] )] {code} |
Assignee | Original: Mark Waite [ markewaite ] |
Resolution | New: Incomplete [ 4 ] | |
Status | Original: Open [ 1 ] | New: Closed [ 6 ] |