Klasse GitRepositoryValidator

java.lang.Object
io.jenkins.plugins.forensics.git.util.GitRepositoryValidator

public class GitRepositoryValidator extends Object
Inspects a given working tree and determines if this path is a valid Git repository that can be used to run one of the forensics analyzers.
Autor:
Ullrich Hafner
  • Felddetails

  • Konstruktordetails

    • GitRepositoryValidator

      public GitRepositoryValidator(SCM scm, Run<?,?> build, FilePath workTree, TaskListener listener, edu.hm.hafner.util.FilteredLog logger)
      Creates a new GitRepositoryValidator.
      Parameter:
      scm - the SCM to create the blamer for
      build - the current build
      workTree - the working tree to inspect
      listener - a task listener
      logger - a logger to report error messages
  • Methodendetails

    • isGitRepository

      public boolean isGitRepository()
      Returns whether the specified working tree contains a valid Git repository that can be used to run one of the forensics analyzers.
      Gibt zurück:
      true if the working tree contains a valid repository, false otherwise
    • createClient

      public org.jenkinsci.plugins.gitclient.GitClient createClient()
      Creates a GitClient using the field values.
      Gibt zurück:
      a GitClient
    • getHead

      public String getHead()
      Returns the GIT_COMMIT environment variable, or 'HEAD' if not set.
      Gibt zurück:
      a GitClient
    • getId

      public String getId()
      Returns the key for the associated SCM.
      Gibt zurück:
      the SCM key
    • getScm

      public SCM getScm()
      Returns the associated SCM.
      Gibt zurück:
      the SCM