public class InverseBuildChooser extends BuildChooserGit build chooser which will select all branches except for those which match the configured branch specifiers.
**/release-*are configured as "Branches to build" then any branches matching those patterns will not be built, unless another branch points to the same revision.
This is useful, for example, when you have jobs building your
releasebranches and you want a second job which builds all new feature branches — i.e. branches which do not match these patterns — without redundantly building
masterand the release branches again each time they change.
- Christopher Orr
- See Also:
- Serialized Form
Constructors Constructor Description
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
getCandidateRevisions(boolean isPollCall, String singleBranch, org.jenkinsci.plugins.gitclient.GitClient git, TaskListener listener, BuildData buildData, BuildChooserContext context)Get a list of revisions that are candidates to be built.
Methods inherited from class hudson.plugins.git.util.BuildChooser
all, allApplicableTo, getCandidateRevisions, getCandidateRevisions, getDescriptor, getDisplayName, prepareWorkingTree, prevBuildForChangelog, prevBuildForChangelog, prevBuildForChangelog
public Collection<hudson.plugins.git.Revision> getCandidateRevisions(boolean isPollCall, String singleBranch, org.jenkinsci.plugins.gitclient.GitClient git, TaskListener listener, BuildData buildData, BuildChooserContext context) throws hudson.plugins.git.GitException, IOException, InterruptedExceptionDescription copied from class:
BuildChooserGet a list of revisions that are candidates to be built.
This method is invoked on the node where the workspace exists, which may not be the controller.
isPollCall- true if this method is called from pollChanges.
singleBranch- contains the name of a single branch to be built this will be non-null only in the simple case, in advanced cases with multiple repositories and/or branches specified then this value will be null.
git- Used for invoking Git
listener- build log
buildData- build data to be used Information that captures what we did during the last build.
context- Object that provides access back to the model object. This is because the build chooser can be invoked on an agent where there's no direct access to the build/project for which this is invoked. If
isPollCallis false, then call back to both project and build are available. If
isPollCallis true, then only the callback to the project is available as there's no contextual build object.
- the candidate revision. Can be an empty set to indicate that there's nothing to build.
hudson.plugins.git.GitException- on git error
IOException- on input or output error
InterruptedException- when interrupted