Klasse BuildFolderFacade

java.lang.Object
io.jenkins.plugins.analysis.core.util.BuildFolderFacade
Alle implementierten Schnittstellen:
Serializable

public class BuildFolderFacade extends Object implements Serializable
Facade to the files in the build folder of the Jenkins controller. Encapsulates all calls to the running Jenkins server so that tests can replace this facade with a stub.
Autor:
Ullrich Hafner
Siehe auch:
  • Konstruktordetails

    • BuildFolderFacade

      public BuildFolderFacade()
  • Methodendetails

    • readConsoleLog

      @MustBeClosed public Stream<String> readConsoleLog(Run<?,?> build)
      Returns the lines of the console log. If the log cannot be read, then the exception message is returned as text.
      Parameter:
      build - the build to get the console log for
      Gibt zurück:
      the lines of the console log
    • readFile

      @MustBeClosed public Reader readFile(Run<?,?> build, String fileName, Charset sourceEncoding) throws IOException
      Returns the affected file with the specified file name.
      Parameter:
      build - the build to read the files from
      fileName - the file to read
      sourceEncoding - the encoding to use when reading the file
      Gibt zurück:
      the affected file
      Löst aus:
      IOException - if the file could not be read
    • canAccessAffectedFileOf

      public boolean canAccessAffectedFileOf(Run<?,?> build, edu.hm.hafner.analysis.Issue issue)
      Returns whether the affected file of the specified issue can be accessed.
      Parameter:
      build - the build to read the files from
      issue - the issue to check the affected file for
      Gibt zurück:
      true if the affected file of the specified issue can be accessed, false otherwise