-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 2.479.1; Git Forensics Plugin 2.2.1
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. 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'
This might just be a configuration error on my end, but I thought it was worth reporting as I couldn't find any references to the error message in documentation or Jira.
The Forensics API's discoverReferenceBuild referenceJob: 'demo/main', requiredResult: Result.SUCCESS works as expected, so I'm using that instead: