Introduction
Pulse uses a powerful post-processing model that allows you to extract information from your build logs and reports (collectively known as artifacts). Default post-processors are provided for many common report formats, with default configurations. You can also configure your own post-processors using a pulse file by:
- Using the regular expression based processors regex.pp and regex-test.pp; or
- Tuning another processor (e.g. junit.pp) using attributes to set non-default properties
However, doing so requires a custom or versioned project. This cookbook entry will show an alternative way to define post-processors which can be used with built-in projects. This can be a good compromise between the simplicity of built-in projects and the flexibility available to pulse files.
Artifacts for Built-in Projects
Built-in projects can have artifacts configured using the pulse™ web interface. When adding an artifact, you are presented with a list of available post-processors to apply to the artifact. The list looks something like:

This list of post-processors is not fixed: it is created dynamically at runtime by pulse™. The processors themselves are configured as simple pulse file fragments. To add your own processor to the list, you just need to create the appropriate template files.
Adding Custom Templates
All custom templates that you create are stored in the $PULSE_DATA/config/templates directory. Different types of templates may be stored here. In this case we are interested in templates stored in the $PULSE_DATA/config/templates/pulse-file/post-processors directory. If this directory does not exist, you should create it before continuing. The templates and properties files you create should then be added into this directory.
Custom post-processors are defined in two files, a Velocity
template and a simple Java properties file. Both files should be named after the post-processor, and should have a .vm and .properties extension respectively. For example, if you are defining a processor named "gcc", you should create the files:
$PULSE_DATA/config/templates/pulse-file/post-processors/gcc.vm
$PULSE_DATA/config/templates/pulse-file/post-processors/gcc.properties
 | Tip
The post-processor templates shipped with pulse™ can be found in the directory $PULSE_HOME/versions/<build number>/system/templates/pulse-file/post-processors. These templates can provide a good starting point for defining your own. |
Velocity Template
The velocity template file should contain a pulse file fragment that defines a post-processor of the desired name. For example, our gcc post-processor may be defined as follows:
<regex.pp name="gcc">
<pattern category="error" expression="\\.[ch]:[0-9]+: error"/>
<pattern category="warning" expression="\\.[ch]:[0-9]+: warning"/>
</regex.pp>
 | Important
Notice that the name of the post-processor defined matches the name of the file (i.e. "gcc"). This must be the case, otherwise you will get build errors regarding an unknown reference when using the post-processor. |
Properties File
The properties file currently contains just one property named "display". This is the name of the processor as displayed in the pulse™ UI. For example:
display=GCC compiler messages processor
If this file does not exist or does not contain the "display" property, pulse™ will simply show the post-processor name (i.e. "gcc").
Applying the Processor
As soon as you have added your custom processor, it will be available for use. When you add a new artifact, or edit an existing one, an extra checkbox should be displayed for your custom processor. If it is not displayed, check the location and names of your template files.