Class DescriptionSetterHelper

java.lang.Object
hudson.plugins.descriptionsetter.DescriptionSetterHelper

public class DescriptionSetterHelper extends Object
Helper class that performs common functionality used by both DescriptionSetterBuilder and DescriptionSetterPublisher.
  • Constructor Details

    • DescriptionSetterHelper

      public DescriptionSetterHelper()
  • Method Details

    • setDescription

      public static boolean setDescription(AbstractBuild<?,?> build, BuildListener listener, String regexp, String description) throws InterruptedException
      Sets 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 InterruptedException
      Sets 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.