Class BuildLogRegexMacro
java.lang.Object
org.jenkinsci.plugins.tokenmacro.TokenMacro
org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
org.jenkinsci.plugins.tokenmacro.impl.BuildLogRegexMacro
- All Implemented Interfaces:
ExtensionPoint
An EmailContent for build log lines matching a regular expression. Shows
lines matching a regular expression (with optional context lines) from the
build log file.
- Author:
- krwalker@stellarscience.com
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
DataBoundTokenMacro.ParameterNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanbooleanstatic final intstatic final intintintstatic final Stringstatic final intstatic final intstatic final intintintintbooleanFields inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
escapeHtml -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptsMacroName(String macroName) Returns true if this object can evaluate the macro of the given name.evaluate(AbstractBuild<?, ?> build, TaskListener listener, String macroName) evaluate(Run<?, ?> run, FilePath workspace, TaskListener listener, String macroName) booleanIndicates whether this macro handlesDataBoundTokenMacro.escapeHtmlon its own inside theevaluatemethods.Methods inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
evaluate, evaluate, hasNestedContentMethods inherited from class org.jenkinsci.plugins.tokenmacro.TokenMacro
all, expand, expand, expand, expand, expandAll, expandAll, expandAll, expandAll, getAutoCompleteList, getPreviousRun, getWorkspace
-
Field Details
-
MACRO_NAME
- See Also:
-
LINES_BEFORE_DEFAULT_VALUE
public static final int LINES_BEFORE_DEFAULT_VALUE- See Also:
-
LINES_AFTER_DEFAULT_VALUE
public static final int LINES_AFTER_DEFAULT_VALUE- See Also:
-
MAX_MATCHES_DEFAULT_VALUE
public static final int MAX_MATCHES_DEFAULT_VALUE- See Also:
-
MAX_TAIL_MATCHES_DEFAULT_VALUE
public static final int MAX_TAIL_MATCHES_DEFAULT_VALUE- See Also:
-
MAX_LINE_LENGTH_DEFAULT_VALUE
public static final int MAX_LINE_LENGTH_DEFAULT_VALUE- See Also:
-
regex
-
linesBefore
public int linesBefore -
linesAfter
public int linesAfter -
maxMatches
public int maxMatches -
showTruncatedLines
public boolean showTruncatedLines -
substText
-
matchedLineHtmlStyle
-
addNewline
public boolean addNewline -
defaultValue
-
greedy
public boolean greedy -
maxTailMatches
public int maxTailMatches -
maxLineLength
public int maxLineLength
-
-
Constructor Details
-
BuildLogRegexMacro
public BuildLogRegexMacro()
-
-
Method Details
-
acceptsMacroName
Description copied from class:TokenMacroReturns true if this object can evaluate the macro of the given name.- Specified by:
acceptsMacroNamein classTokenMacro- Parameters:
macroName- By convention we encourage all caps name.- Returns:
- true
... to claim the macro of the given name and have
TokenMacro.evaluate(AbstractBuild, TaskListener, String, Map, ListMultimap)called.
-
getAcceptedMacroNames
- Overrides:
getAcceptedMacroNamesin classTokenMacro
-
evaluate
public String evaluate(AbstractBuild<?, ?> build, TaskListener listener, String macroName) throws MacroEvaluationException, IOException, InterruptedException- Specified by:
evaluatein classDataBoundTokenMacro- Throws:
MacroEvaluationExceptionIOExceptionInterruptedException
-
evaluate
public String evaluate(Run<?, ?> run, FilePath workspace, TaskListener listener, String macroName) throws MacroEvaluationException, IOException, InterruptedException- Overrides:
evaluatein classDataBoundTokenMacro- Throws:
MacroEvaluationExceptionIOExceptionInterruptedException
-
handlesHtmlEscapeInternally
public boolean handlesHtmlEscapeInternally()Description copied from class:DataBoundTokenMacroIndicates whether this macro handlesDataBoundTokenMacro.escapeHtmlon its own inside theevaluatemethods. If this method returnsfalseandDataBoundTokenMacro.escapeHtmlistruethen the returned value fromDataBoundTokenMacro.evaluate(AbstractBuild, TaskListener, String)andDataBoundTokenMacro.evaluate(Run, FilePath, TaskListener, String)will be escaped. If this method returnstrueno escaping will be performed, and it is assumed the escaping will be handled internally by the implementing class. It is then also assumed that thehelp.jellyfile for that class mentions theDataBoundTokenMacro.escapeHtmlparameter.- Overrides:
handlesHtmlEscapeInternallyin classDataBoundTokenMacro- Returns:
- true if the implementing class handles its own html escaping.
-