Package hudson.plugins.descriptionsetter
Class DescriptionSetterHelper
java.lang.Object
hudson.plugins.descriptionsetter.DescriptionSetterHelper
Helper class that performs common functionality used by both
DescriptionSetterBuilder and DescriptionSetterPublisher.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
setDescription
(AbstractBuild<?, ?> build, BuildListener listener, String regexp, String description) Sets the description on the given build based on the specified regular expression and description.static boolean
setDescription
(AbstractBuild<?, ?> build, BuildListener listener, String regexp, String description, boolean appendMode) Sets the description on the given build based on the specified regular expression and description.
-
Constructor Details
-
DescriptionSetterHelper
public DescriptionSetterHelper()
-
-
Method Details
-
setDescription
public static boolean setDescription(AbstractBuild<?, ?> build, BuildListener listener, String regexp, String description) throws InterruptedExceptionSets the description on the given build based on the specified regular expression and description.- Parameters:
build
- the build whose description to set.listener
- the build listener to report events to.regexp
- the regular expression to apply to the build log.description
- the description to set.- Returns:
- true, regardless of if the regular expression matched and a description could be set or not.
- Throws:
InterruptedException
- if the build is interrupted by the user.
-
setDescription
public static boolean setDescription(AbstractBuild<?, ?> build, BuildListener listener, String regexp, String description, boolean appendMode) throws InterruptedExceptionSets the description on the given build based on the specified regular expression and description.- Parameters:
build
- the build whose description to set.listener
- the build listener to report events to.regexp
- the regular expression to apply to the build log.description
- the description to set.appendMode
- if true, description is added to the current one- Returns:
- true, regardless of if the regular expression matched and a description could be set or not.
- Throws:
InterruptedException
- if the build is interrupted by the user.
-