Adds an error badge to the current Pipeline build. An error badge uses the "error" symbol with a text message. Badges added by addErrorBadge are displayed in the build history of the Pipeline job.

The Pipeline Syntax Snippet Generator guides the user to select badge options and provides online help for the options.

Example: Badge with an error

The following example adds an "error" symbol with the text, "This is an error":

addErrorBadge text: 'This is an error'