hudson.plugins.git.util
Class GerritBuildChooser
java.lang.Object
hudson.plugins.git.util.GerritBuildChooser
- All Implemented Interfaces:
- IBuildChooser
public class GerritBuildChooser
- extends java.lang.Object
- implements IBuildChooser
|
Method Summary |
java.util.Collection<Revision> |
getCandidateRevisions(boolean isPollCall,
java.lang.String singleBranch)
Determines which Revisions to build. |
hudson.model.Action |
getData()
Get data to be persisted. |
Build |
revisionBuilt(Revision revision,
int buildNumber,
hudson.model.Result result)
Report back whether a revision built was successful or not. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GerritBuildChooser
public GerritBuildChooser(GitSCM gitSCM,
IGitAPI git,
GitUtils utils,
BuildData data)
getCandidateRevisions
public java.util.Collection<Revision> getCandidateRevisions(boolean isPollCall,
java.lang.String singleBranch)
throws GitException,
java.io.IOException
- Determines which Revisions to build.
Uses git log --all to get every commit in repository. Then orders commits by commit time
and determines what to build next.
Doesn't care about branches.
- Specified by:
getCandidateRevisions in interface IBuildChooser
- Parameters:
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.
- Returns:
- the candidate revision.
- Throws:
java.io.IOException
GitException
revisionBuilt
public Build revisionBuilt(Revision revision,
int buildNumber,
hudson.model.Result result)
- Description copied from interface:
IBuildChooser
- Report back whether a revision built was successful or not.
- Specified by:
revisionBuilt in interface IBuildChooser
getData
public hudson.model.Action getData()
- Description copied from interface:
IBuildChooser
- Get data to be persisted.
- Specified by:
getData in interface IBuildChooser
- Returns:
Copyright © 2010. All Rights Reserved.