|
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]*) Change log 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 of the plugin has the 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. |
