-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 1.609.3
GIT plugin 2.4.0
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.