-
Bug
-
Resolution: Unresolved
-
Trivial
-
Jenkins 2.277.3
Bitbucket Server Integration plugin 2.1.3
Git plugin 4.7.1
Git client plugin 3.7.1
Pipeline: Multibranch plugin 2.23
SCM API plugin 2.6.4
I had a Multibranch Pipeline project in Jenkins, with a Bitbucket Server branch source that refers to a repository in Bitbucket Server. That worked OK. Then I added a second Bitbucket Server branch source to the same Jenkins project, now referring to a personal fork of the repository. The original repository and the fork have only one branch each, and the names of these branches are not the same, so I hoped that Jenkins would find both branches. However, when I typed the name of my profile in the "Project name" field of the second branch source, the configuration screen cleared the "Repository name" of the first branch source. I did not originally notice that before saving, and the empty "Repository name" field then caused the following exception:
[Thu Apr 29 10:50:15 EEST 2021] Starting branch indexing... ERROR: [to huhtikuuta 29 10:50:15 EEST 2021] Could not fetch branches from source 5b61467d-72cb-4a41-b24d-c27900d1093d java.lang.NullPointerException at hudson.Util.getDigestOf(Util.java:636) at jenkins.plugins.git.AbstractGitSCMSource.getCacheEntry(AbstractGitSCMSource.java:1391) at jenkins.plugins.git.AbstractGitSCMSource.getCacheEntry(AbstractGitSCMSource.java:1218) at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:339) at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:566) at com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCMSource$CustomGitSCMSource.accessibleRetrieve(BitbucketSCMSource.java:505) at com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCMSource.retrieve(BitbucketSCMSource.java:233) at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:283) at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:641) at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:278) at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165) at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1032) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) [Thu Apr 29 10:50:15 EEST 2021] Finished branch indexing. Indexing took 1 ms FATAL: Failed to recompute children of [REDACTED] java.lang.NullPointerException at hudson.Util.getDigestOf(Util.java:636) at jenkins.plugins.git.AbstractGitSCMSource.getCacheEntry(AbstractGitSCMSource.java:1391) at jenkins.plugins.git.AbstractGitSCMSource.getCacheEntry(AbstractGitSCMSource.java:1218) at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:339) at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:566) at com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCMSource$CustomGitSCMSource.accessibleRetrieve(BitbucketSCMSource.java:505) at com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCMSource.retrieve(BitbucketSCMSource.java:233) at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:283) at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:641) at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:278) at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165) at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1032) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE
Editing one branch source on the configuration screen should not automatically clear or change any fields of other branch sources.