Giter Site home page Giter Site logo

description-setter-plugin's Introduction

Description setter plugin

This plugin sets the description for each build, based on a regular expression match of the contents of the build log. To use the plugin, you must enable it in the Post Build actions of your freestyle or matrix job configuration.

Once enabled, you will notice that it asks for a regular expression. This regular expression is used to scan the build log file, line by line (multi lines are notsupported). It will take the first line that matches the regular expression. The description is set for that particular build from the first capturing group of the regular expression. The regular expression must specify at least one capturing group by putting the part you want to select between parentheses.

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 regular expression to be:

\[version\] (.*)

An Apache Maven release build would typically have a line like:

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

So the following regular expression would select the version:

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

The Build Name Setter plugin provides similiar functionality for the display name, instead of description.

Using multiple capture groups

You can now use different groups captured by the regular expression (e.g. "foo \1 bar \2") by referencing them in the Description field. (If you leave the description field empty, the first match group will be used.)

Changelog

Release notes are recorded in GitHub.

description-setter-plugin's People

Contributors

alanharder avatar askb avatar gounthar avatar halkeye avatar huybrechts avatar jasonmathison avatar marco-miller avatar markewaite avatar michael1010 avatar ndeloof avatar olivergondza avatar pgweiss avatar pjanouse avatar sghill avatar sghill-rewrite avatar tyuki39 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.