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:
-
Field Summary
Modifier and TypeFieldDescriptionfinal boolean
final String
SHA1, ref name, etc.final hudson.plugins.git.Revision
-
Constructor Summary
ConstructorDescriptionRevisionParameterAction
(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
Modifier and TypeMethodDescriptionboolean
canOriginateFrom
(Iterable<org.eclipse.jgit.transport.RemoteConfig> remotes) This method tries to determine whether the commit is from given remotes.void
foldIntoExisting
(Queue.Item item, Queue.Task owner, List<Action> otherActions) Folds this Action into another action already associated with item fromFoldableAction
boolean
shouldSchedule
(List<Action> actions) Returns whether the new item should be scheduled.hudson.plugins.git.Revision
toRevision
(hudson.plugins.git.IGitAPI git) Deprecated.hudson.plugins.git.Revision
toRevision
(org.jenkinsci.plugins.gitclient.GitClient git) toString()
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 Details
-
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 Details
-
RevisionParameterAction
-
RevisionParameterAction
-
RevisionParameterAction
-
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 Details
-
toRevision
@Deprecated public hudson.plugins.git.Revision toRevision(hudson.plugins.git.IGitAPI git) throws hudson.plugins.git.GitException, InterruptedException Deprecated.- Throws:
hudson.plugins.git.GitException
InterruptedException
-
toRevision
public hudson.plugins.git.Revision toRevision(org.jenkinsci.plugins.gitclient.GitClient git) throws hudson.plugins.git.GitException, InterruptedException - Throws:
hudson.plugins.git.GitException
InterruptedException
-
canOriginateFrom
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:
false
if remote URL was supplied during construction and matches none of given remote URLs, otherwisetrue
-
toString
-
shouldSchedule
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:
shouldSchedule
in interfaceQueue.QueueAction
-
foldIntoExisting
Folds this Action into another action already associated with item fromFoldableAction
- Specified by:
foldIntoExisting
in interfaceFoldableAction
-