jenkinsci / jenkinsci/git-plugin

[JENKINS-21000] Git plugin should ignore failure to retrieve previous build ref

Open
#2,387 1 comment 0 reactions 0 assignees View on GitHub
component:git-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

Jenkins appears to obsess about knowing what the previous build's ref was. If that ref is unavailable in the current clone, the build fails.

This is prevalent in builds triggered by gerrit, since they will often be from random refs in the history, and not necessarily in any meaningful order.

It would be nice if there was a way to tell Jenkins to not even try to determine what the previous build was, but meanwhile it would just help if the build didn't fall over just because the previous build is unavailable.

---
Originally reported by cg, imported from: Git plugin should ignore failure to retrieve previous build ref


  • status: Open
  • priority: Major
  • component(s): git-plugin
  • resolution: Unresolved
  • votes: 3
  • watchers: 5
  • imported: 2025-12-02

Raw content of original issue

Jenkins appears to obsess about knowing what the previous build's ref was. If that ref is unavailable in the current clone, the build fails.

This is prevalent in builds triggered by gerrit, since they will often be from random refs in the history, and not necessarily in any meaningful order.

It would be nice if there was a way to tell Jenkins to not even try to determine what the previous build was, but meanwhile it would just help if the build didn't fall over just because the previous build is unavailable.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.