Description Setter Plugin

Plugin Information

Plugin ID description-setter
Latest Release 1.8-h-1
Latest Release Date Aug 13, 2013
Sources Github
Support Eclipse Hudson Forum
Issue Tracking Eclipse Bugzilla

This plugin sets the description for each build, based upon a RegEx test of the build log file.
To use the plug in, you must tick it in the Post Build Actions, in your job configuration page. Once ticked, you will notice that it asks for a RegEx. This RegEx is used to scan the build log file, line by line (multi lines are not supported), and it will take the first line that matches your RegEx. The description that is then set for that particular build, is taken from the first Capturing Group. You must specify at least one capturing group in your RegEx by putting the part you want to select between parentheses (if you specify more, these will be ignored).

You can thus use this to have your build script echo out some particular information such as the modifying authors from SCM, or the datestamp, or the published version number, or....

For example, if your build file contains the lines

...
[version] My Application Version XYZ
...

Then in order to set the build description to My Application Version XYZ, you would set the RegEx to be:

\[version\] (.*)

A Maven release build would typically have a line like:

...
[INFO] Uploading project information for my.project.name 0.4.0
...

So the following regex would select the version:

 .*\[INFO\] Uploading project information for [^\s]* ([^\s]*)

Using multiple capture groups

You can now use groups captured by the regex in descriptions (e.g. "foo \1 bar \2").

Changelog

Release 1.7 (Dec 31, 2010):

Release 1.6 (Dec 1, 2009):

  • Bugfix (1.5 is only usable for matrix projects)

Release 1.5:

  • Large parts are rewritten. Should be backwards compatible -- create an issue if not.
  • You can now use  groups captured by the regex in descriptions (e.g. "foo \1 bar \2"). Default is still to use the first group as description. (wiki page has not been updated to reflect this)
  • Also works for matrix projects

Release 1.4:

  • Added option "Use explicit description instead of regexp".  Allows user to hard code the description instead of doing a regexp search of build log.  Default is off.

Release 1.3:

  • Fixes an issue where the RegEx could return only 1 item and cause and array out of bounds problem. 

Release 1.2:

  • Add ability to set the description for failed builds. On your job configuration page you will need to check the box for setting description upon build failure and if you wish to use a different RegEx then the main one you can enter it in the text box below.

Labels:

plugin-post-build plugin-post-build Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Jan 13, 2010

    Nicholas Hahn says:

    Is the description available as an environment variable for another plug-in (i.e...

    Is the description available as an environment variable for another plug-in (i.e Editable Email Notification) to use?

    1. Jul 23, 2010

      Rakesh says:

      Hi, I also have the same requirement. I want the description exposed as a varia...

      Hi,

      I also have the same requirement. I want the description exposed as a variable so that it can be sent in an email.

      --Rakesh

  2. Mar 31, 2010

    Joe Littlejohn says:

    Is it possible to use environment variables in the description? I tried to use t...

    Is it possible to use environment variables in the description? I tried to use the build number like:

    ${env['BUILD_NUMBER']}
    

    but it didn't get expanded :(

  3. Nov 09, 2010

    Vijay says:

    Is it possible to format the data in description tab? If yes example please . ...

    Is it possible to format the data in description tab? If yes example please .

    If no any suggestions, would like to format a huge string in multiple lines.

  4. Aug 18, 2011

    Jonathan Shuali says:

    It is possible to use environment variables in the description like: SVN# $SV...

    It is possible to use environment variables in the description like:

    SVN# $SVN_REVISION
    

    It worked great for me.

  5. Mar 01, 2013

    Ganeshwari says:

    Could please tell me, May I create the regular expression to look the slave job ...

    Could please tell me, May I create the regular expression to look the slave job log for setting/displaying description in Master job ?

    1. Mar 04, 2013

      Winston Prakash says:

      Hi Genshwari, I would suggest you to ask questions at the Hudson Eclipse forum t...

      Hi Genshwari, I would suggest you to ask questions at the Hudson Eclipse forum to get reply http://www.eclipse.org/forums/index.php/f/229/ If you don't have eclipse account, you can create one here https://dev.eclipse.org/site_login/createaccount.php