public class GitToolChooser extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GitToolChooser.RepositorySizeAPI
Other plugins can estimate the size of repository using this extension point
The size is assumed to be in KiBs
|
| Constructor and Description |
|---|
GitToolChooser(String remoteName,
Item projectContext,
String credentialsId,
hudson.plugins.git.GitTool gitExe,
Node n,
TaskListener listener,
Boolean useJGit)
Instantiate class using the remote name.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
clearRepositorySizeCache()
Clear the cache of repository sizes.
|
String |
getGitTool()
Recommend git tool to be used by the git client
|
static void |
putRepositorySizeCache(String repoURL,
long repoSize)
Insert an entry into the cache of repository sizes.
|
hudson.plugins.git.GitTool |
recommendGitToolOnAgent(hudson.plugins.git.GitTool userChoice) |
public GitToolChooser(String remoteName, Item projectContext, String credentialsId, hudson.plugins.git.GitTool gitExe, Node n, TaskListener listener, Boolean useJGit) throws IOException, InterruptedException
remoteName - the repository urlprojectContext - the context where repository size is being estimatedcredentialsId - credential used to access the repository or null if no credential is requiredgitExe - Git tool ('git', 'jgit', 'jgitapache') to be used as the default tooln - A Jenkins agent used to check validity of git installationlistener - TaskListener required by GitUtils.resolveGitTool()useJGit - if true the JGit is allowed as an implementationIOException - on errorInterruptedException - on errorpublic hudson.plugins.git.GitTool recommendGitToolOnAgent(hudson.plugins.git.GitTool userChoice)
public String getGitTool()
public static void clearRepositorySizeCache()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public static void putRepositorySizeCache(String repoURL, long repoSize)
repoURL - repository URL to be added as a cache keyrepoSize - repository size in kilobytesCopyright © 2007–2020. All rights reserved.