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,
edu.hm.hafner.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.
|
String |
getId()
Returns the key for the associated SCM.
|
SCM |
getScm()
Returns the associated SCM.
|
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, edu.hm.hafner.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()
GitClientpublic String getId()
public SCM getScm()
Copyright © 2016–2021. All rights reserved.