Package hudson.plugins.git
Class RevisionParameterAction
- java.lang.Object
-
- hudson.model.InvisibleAction
-
- hudson.plugins.git.RevisionParameterAction
-
- All Implemented Interfaces:
Action,ModelObject,FoldableAction,Queue.QueueAction,Serializable
public class RevisionParameterAction extends InvisibleAction implements Serializable, Queue.QueueAction, FoldableAction
Used as a build parameter to specify the revision to be built.- Author:
- Kohsuke Kawaguchi, Chris Johnson
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description booleancombineCommitsStringcommitSHA1, ref name, etc.hudson.plugins.git.Revisionrevision
-
Constructor Summary
Constructors Constructor Description RevisionParameterAction(hudson.plugins.git.Revision revision)RevisionParameterAction(hudson.plugins.git.Revision revision, boolean combineCommits)RevisionParameterAction(String commit)RevisionParameterAction(String commit, boolean combineCommits)RevisionParameterAction(String commit, boolean combineCommits, org.eclipse.jgit.transport.URIish repoURL)RevisionParameterAction(String commit, org.eclipse.jgit.transport.URIish repoURL)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancanOriginateFrom(Iterable<org.eclipse.jgit.transport.RemoteConfig> remotes)This method tries to determine whether the commit is from given remotes.voidfoldIntoExisting(Queue.Item item, Queue.Task owner, List<Action> otherActions)Folds this Action into another action already associated with item fromFoldableActionbooleanshouldSchedule(List<Action> actions)Returns whether the new item should be scheduled.hudson.plugins.git.RevisiontoRevision(hudson.plugins.git.IGitAPI git)Deprecated.hudson.plugins.git.RevisiontoRevision(org.jenkinsci.plugins.gitclient.GitClient git)StringtoString()-
Methods inherited from class hudson.model.InvisibleAction
getDisplayName, getIconFileName, getUrlName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface hudson.model.Action
getDisplayName, getIconFileName, getUrlName
-
-
-
-
Field Detail
-
commit
public final String commit
SHA1, ref name, etc. that can be "git rev-parse"d into a specific commit.
-
combineCommits
public final boolean combineCommits
-
revision
public final hudson.plugins.git.Revision revision
-
-
Constructor Detail
-
RevisionParameterAction
public RevisionParameterAction(String commit)
-
RevisionParameterAction
public RevisionParameterAction(String commit, org.eclipse.jgit.transport.URIish repoURL)
-
RevisionParameterAction
public RevisionParameterAction(String commit, boolean combineCommits)
-
RevisionParameterAction
public RevisionParameterAction(String commit, boolean combineCommits, org.eclipse.jgit.transport.URIish repoURL)
-
RevisionParameterAction
public RevisionParameterAction(hudson.plugins.git.Revision revision)
-
RevisionParameterAction
public RevisionParameterAction(hudson.plugins.git.Revision revision, boolean combineCommits)
-
-
Method Detail
-
toRevision
@Deprecated public hudson.plugins.git.Revision toRevision(hudson.plugins.git.IGitAPI git) throws hudson.plugins.git.GitException, InterruptedException
Deprecated.- Throws:
hudson.plugins.git.GitExceptionInterruptedException
-
toRevision
public hudson.plugins.git.Revision toRevision(org.jenkinsci.plugins.gitclient.GitClient git) throws hudson.plugins.git.GitException, InterruptedException- Throws:
hudson.plugins.git.GitExceptionInterruptedException
-
canOriginateFrom
public boolean canOriginateFrom(Iterable<org.eclipse.jgit.transport.RemoteConfig> remotes)
This method tries to determine whether the commit is from given remotes. To achieve that it uses remote URL supplied during construction of this instance.- Parameters:
remotes- candidate remotes for this commit- Returns:
falseif remote URL was supplied during construction and matches none of given remote URLs, otherwisetrue
-
shouldSchedule
public boolean shouldSchedule(List<Action> actions)
Returns whether the new item should be scheduled. An action should return true if the associated task is 'different enough' to warrant a separate execution. fromQueue.QueueAction- Specified by:
shouldSchedulein interfaceQueue.QueueAction
-
foldIntoExisting
public void foldIntoExisting(Queue.Item item, Queue.Task owner, List<Action> otherActions)
Folds this Action into another action already associated with item fromFoldableAction- Specified by:
foldIntoExistingin interfaceFoldableAction
-
-