public class GitRepositoryValidator extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
INFO_SHALLOW_CLONE
Error message.
|
| Constructor and Description |
|---|
GitRepositoryValidator(SCM scm,
Run<?,?> build,
FilePath workTree,
TaskListener listener,
io.jenkins.plugins.forensics.util.FilteredLog logger)
Creates a new
GitRepositoryValidator. |
| Modifier and Type | Method and Description |
|---|---|
org.jenkinsci.plugins.gitclient.GitClient |
createClient()
Creates a
GitClient using the field values. |
String |
getHead()
Returns the GIT_COMMIT environment variable, or 'HEAD' if not set.
|
boolean |
isGitRepository()
Returns whether the specified working tree contains a valid Git repository that can be used to run one of the
forensics analyzers.
|
public static final String INFO_SHALLOW_CLONE
public GitRepositoryValidator(SCM scm, Run<?,?> build, FilePath workTree, TaskListener listener, io.jenkins.plugins.forensics.util.FilteredLog logger)
GitRepositoryValidator.scm - the SCM to create the blamer forbuild - the current buildworkTree - the working tree to inspectlistener - a task listenerlogger - a logger to report error messagespublic boolean isGitRepository()
true if the working tree contains a valid repository, false otherwisepublic org.jenkinsci.plugins.gitclient.GitClient createClient()
GitClient using the field values.GitClientpublic String getHead()
GitClientCopyright © 2016–2019. All rights reserved.