The post-processing element

When a plug-in step's command element finishes processing, the step's mandatory post-processing element runs.

The post-processing element sets the step's output properties and provides error handling. The post-processing element can contain any valid JavaScriptâ„¢ script. Unlike the command element, post-processing scripts must be written in JavaScript).

You have access to a java.util.Properties variable called properties. The properties variable has several special properties: exitCode contains the process exit code, and Status contains the step's status. A Status value of Success means that the step is complete. The Create File step's post-processing examines the command's exitCode and then sets the Status property accordingly.

Another available variable scanner can scan the step's output log and run commands that are based on the results.

You can use a post-processing script to set output properties that can be used in other steps in the same process, which enables complex workflows.

The script that is defined in the post-processing element is the step's default behavior. Users can also provide their own script, overriding the default behavior, when they define the step in the Build editor.