-
-
Notifications
You must be signed in to change notification settings - Fork 27
[JENKINS-74921] discoverGitReferenceBuild always reports "no reference build found" #1178
Description
I've added discoverGitReferenceBuild to a multibranch pipeline pulling from a git repository 'demo' in Bitbucket Server. My branch is 'enable-reference-build', so it's using itself as a reference.
pipeline {
agent any;
stages {
stage('Reference') {
steps {
discoverGitReferenceBuild referenceJob: 'demo/enable-reference-build'
}
}
}
}
When I build this pipeline, it reports
Configured reference job: 'demo/enable-reference-build' -> selected build '#5' of reference job does not yet contain a `GitCommitsRecord` -> no reference build found No reference build with required status found that contains matching commits
The branch has 6 commits, well under maxCommits, so I don't think this is related to JENKINS-66479">JENKINS-66479. I get the same message with referenceJob: main. Enabling latestBuildIfNotFound allows it to fallback to the latest build, but subsequent builds continue to report the warning:
Configured reference job: 'demo/enable-reference-build' -> selected build '#7' of reference job does not yet contain a `GitCommitsRecord` -> no reference build found No reference build with required status found that contains matching commits Falling back to latest completed build of reference job: '#7'
Originally reported by pconley, imported from: discoverGitReferenceBuild always reports "no reference build found"
- assignee:
drulli
- status: Open
- priority: Minor
- component(s): git-forensics-plugin
- resolution: Unresolved
- votes: 0
- watchers: 2
- imported: 20260107-220949
Raw content of original issue
I've added discoverGitReferenceBuild to a multibranch pipeline pulling from a git repository 'demo' in Bitbucket Server. My branch is 'enable-reference-build', so it's using itself as a reference.
pipeline { agent any; stages { stage('Reference') { steps { discoverGitReferenceBuild referenceJob: 'demo/enable-reference-build' } } } }When I build this pipeline, it reports
Configured reference job: 'demo/enable-reference-build' -> selected build '#5' of reference job does not yet contain a `GitCommitsRecord` -> no reference build found No reference build with required status found that contains matching commitsThe branch has 6 commits, well under maxCommits, so I don't think this is related to
JENKINS-66479. I get the same message with referenceJob: main. Enabling latestBuildIfNotFound allows it to fallback to the latest build, but subsequent builds continue to report the warning:Configured reference job: 'demo/enable-reference-build' -> selected build '#7' of reference job does not yet contain a `GitCommitsRecord` -> no reference build found No reference build with required status found that contains matching commits Falling back to latest completed build of reference job: '#7'
- environment:
Jenkins 2.479.1; Git Forensics Plugin 2.2.1