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 Details

    • 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 Details

    • 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 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

      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:
      false if remote URL was supplied during construction and matches none of given remote URLs, otherwise true
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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. from Queue.QueueAction
      Specified by:
      shouldSchedule in interface Queue.QueueAction
    • foldIntoExisting

      public void foldIntoExisting(Queue.Item item, Queue.Task owner, List<Action> otherActions)
      Folds this Action into another action already associated with item from FoldableAction
      Specified by:
      foldIntoExisting in interface FoldableAction