public class GitUtils extends Object implements Serializable
| Constructor and Description |
|---|
GitUtils(hudson.model.TaskListener listener,
org.jenkinsci.plugins.gitclient.GitClient git) |
| Modifier and Type | Method and Description |
|---|---|
List<hudson.plugins.git.Revision> |
filterTipBranches(Collection<hudson.plugins.git.Revision> revisions)
Return a list of 'tip' branches (I.E.
|
static String[] |
fixupNames(String[] names,
String[] urls) |
Collection<hudson.plugins.git.Revision> |
getAllBranchRevisions()
Return a list of "Revisions" - where a revision knows about all the branch names that refer to
a SHA1.
|
static hudson.EnvVars |
getPollEnvironment(hudson.model.AbstractProject p,
hudson.FilePath ws,
hudson.Launcher launcher,
hudson.model.TaskListener listener) |
static hudson.EnvVars |
getPollEnvironment(hudson.model.AbstractProject p,
hudson.FilePath ws,
hudson.Launcher launcher,
hudson.model.TaskListener listener,
boolean reuseLastBuildEnv)
An attempt to generate at least semi-useful EnvVars for polling calls, based on previous build.
|
hudson.plugins.git.Revision |
getRevisionContainingBranch(String branchName)
Return the revision containing the branch name.
|
hudson.plugins.git.Revision |
getRevisionForSHA1(org.eclipse.jgit.lib.ObjectId sha1) |
hudson.plugins.git.Revision |
sortBranchesForRevision(hudson.plugins.git.Revision revision,
List<BranchSpec> branchOrder) |
hudson.plugins.git.Revision |
sortBranchesForRevision(hudson.plugins.git.Revision revision,
List<BranchSpec> branchOrder,
hudson.EnvVars env) |
static hudson.model.Node |
workspaceToNode(hudson.FilePath workspace) |
public static hudson.model.Node workspaceToNode(hudson.FilePath workspace)
public Collection<hudson.plugins.git.Revision> getAllBranchRevisions() throws hudson.plugins.git.GitException, IOException, InterruptedException
IOException - on input or output errorhudson.plugins.git.GitException - on git errorInterruptedException - when interruptedpublic hudson.plugins.git.Revision getRevisionContainingBranch(String branchName) throws hudson.plugins.git.GitException, IOException, InterruptedException
branchName - name of branch to be searchedIOException - on input or output errorhudson.plugins.git.GitException - on git errorInterruptedException - when interruptedpublic hudson.plugins.git.Revision getRevisionForSHA1(org.eclipse.jgit.lib.ObjectId sha1)
throws hudson.plugins.git.GitException,
IOException,
InterruptedException
hudson.plugins.git.GitExceptionIOExceptionInterruptedExceptionpublic hudson.plugins.git.Revision sortBranchesForRevision(hudson.plugins.git.Revision revision,
List<BranchSpec> branchOrder)
public hudson.plugins.git.Revision sortBranchesForRevision(hudson.plugins.git.Revision revision,
List<BranchSpec> branchOrder,
hudson.EnvVars env)
@WithBridgeMethods(value=java.util.Collection.class) public List<hudson.plugins.git.Revision> filterTipBranches(Collection<hudson.plugins.git.Revision> revisions) throws InterruptedException
revisions - branches to be included in the search for tip branchesInterruptedException - when interruptedpublic static hudson.EnvVars getPollEnvironment(hudson.model.AbstractProject p,
hudson.FilePath ws,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic static hudson.EnvVars getPollEnvironment(hudson.model.AbstractProject p,
hudson.FilePath ws,
hudson.Launcher launcher,
hudson.model.TaskListener listener,
boolean reuseLastBuildEnv)
throws IOException,
InterruptedException
p - abstract project to be consideredws - workspace to be consideredlauncher - launcher to use for calls to nodeslistener - build logreuseLastBuildEnv - true if last build environment should be consideredIOException - on input or output errorInterruptedException - when interruptedCopyright © 2007–2017. All rights reserved.