jenkinsci / jenkinsci/git-plugin

[JENKINS-30343] Allow manual rebuild of branches not yet build succesfully by triggering manually

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

Description

I have a job that is configured to track multiple branches (e.g. branch specifier is set to 'origin/topic/*'). The first run of the job will build all branches that match. Subsequent runs will only build the latest head matching the branch specification.

I tested it on a job that is not set to poll or build periodically. I would have expected it to build all branches all the time. If there's only one branch specified it always rebuilds that branch regardless of changes.

However, the use case is, to be able to rebuild all branches that may have failed due to system failure or misconfiguration on a job that is otherwise set to poll nightly. I'm not sure what the current logic is for deciding what to build when triggered manually. For polling, there is a check if a head's commit id was already included in a previous build. For a manual build, it would be useful to check if a head's commit id was included in previous successful build. If so, it can be skipped - possibly mentioning the fact in the console output. If it was included in a failed build it, rebuild it.

---
Originally reported by tba, imported from: Allow manual rebuild of branches not yet build succesfully by triggering manually


  • status: Open
  • priority: Minor
  • component(s): git-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-02

Raw content of original issue

I have a job that is configured to track multiple branches (e.g. branch specifier is set to 'origin/topic/*'). The first run of the job will build all branches that match. Subsequent runs will only build the latest head matching the branch specification.

I tested it on a job that is not set to poll or build periodically. I would have expected it to build all branches all the time. If there's only one branch specified it always rebuilds that branch regardless of changes.

However, the use case is, to be able to rebuild all branches that may have failed due to system failure or misconfiguration on a job that is otherwise set to poll nightly. I'm not sure what the current logic is for deciding what to build when triggered manually. For polling, there is a check if a head's commit id was already included in a previous build. For a manual build, it would be useful to check if a head's commit id was included in previous successful build. If so, it can be skipped - possibly mentioning the fact in the console output. If it was included in a failed build it, rebuild it.

environment

```
Jenkins 1.609.3

GIT plugin 2.4.0
```

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.