Klasse BuildFolderFacade
java.lang.Object
io.jenkins.plugins.analysis.core.util.BuildFolderFacade
- Alle implementierten Schnittstellen:
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:
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
canAccessAffectedFileOf
(Run<?, ?> build, edu.hm.hafner.analysis.Issue issue) Returns whether the affected file of the specified issue can be accessed.readConsoleLog
(Run<?, ?> build) Returns the lines of the console log.Returns the affected file with the specified file name.
-
Konstruktordetails
-
BuildFolderFacade
public BuildFolderFacade()
-
-
Methodendetails
-
readConsoleLog
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 IOExceptionReturns the affected file with the specified file name.- Parameter:
build
- the build to read the files fromfileName
- the file to readsourceEncoding
- 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
Returns whether the affected file of the specified issue can be accessed.- Parameter:
build
- the build to read the files fromissue
- 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
-