Share this page

# Build failure classification

This topic describes how to create rules that map Jenkins build log messages to build failure classifications. These rules are used to analyze build logs and automatically classify build failures.

In this topic:

## Overview

Users with roles based on the DevOps admin role generally have the permissions needed to manage build failure classification rules.

Other users can create classification rules inside a pipeline run, when analyzing build failures. For details, see Create rules to classify build failures automatically.

Back to top

## Best practices for managing rules

It's most convenient to create rules in a pipeline run's Logs tab. You can open a build log and create a rule based on a specific message.

You can edit existing rules or remove rules that are not necessary in the Settings men as described in Create a build failure classification rule.

The goal is to reach a small number of rules that cover most of the log messages and build failure classifications that are relevant for your pipeline runs.

Back to top

## Create a build failure classification rule

1. Open the global menu and select Administration > General Settings.
2. Select a workspace.

3. In the DevOps tab, select Log Classification Rules.

4. Click + Rule to add a rule.

5. Give the rule a meaningful name, such as `Null pointer`.

6. Enter the pattern that identifies the log lines you want to map to a specific build failure classification.

   Use `*` as a wildcard and use a `\` before special characters.

   For example, `*NullPointerException*`

7. Select a classification to assign to log lines that match the pattern.

   For example, `Code issue`

   Tip: To add classification labels to the list of available labels, go to a pipeline run's Builds tab and click the Build Failure Classification button .

8. Click OK.

   The rule is applied whenever a Jenkins build log for a failed build is received.

   Log lines that match the pattern are labeled with the specified classification. If a line matches more than one rule, it is classified by the most recently updated rule.

   The relevant builds are automatically labeled with the first classification mapped in their log.

Back to top

## Modifying a rule that is already in use

Change rule in use

If you change a rule's classification, any log line already assigned by this rule is labeled with the new classification.

This affects log files from previous builds, but does not affect the classification of any existing builds. The change in the rule affects the classification of future builds only.

Delete rule in use

If you delete a rule that has already assigned a classification to a build log line, the classification is removed from all log files, but remains on any builds to which it was assigned.

Back to top

See also:

- Analyze build failures
- Analyze test failures

https://admhelp.microfocus.com Software Delivery Management 8942
Tips to improve your search results... OpenText™ Software Delivery Management Help Center OpenText™ Software Delivery Management Help 26.1 All View Local Help Center View Online Help Center Version: