Break the Build on a Quality Gate
A quality gate is the set of conditions an assessment must meet, for example "no Critical issues". After every pipeline scan, IZ Suite judges the results against the gate and returns PASSED or FAILED. Your pipeline uses that result to stop a build that does not meet your standards.

How the gate is decided
The gate is decided on the server, never by the scanner, so pipeline scans, scheduled scans and the screens all show the same result.
Per technology. Each technology in the scan is judged by the quality gate of its active quality profile. Which gate applies follows the organization defaults and application selections described in Quality Gates.
Per condition. Issue-count conditions count the findings of each severity. Other conditions read the measured value the scan recorded. A condition whose value was not measured, and a Boolean condition, is not evaluated.
Exceptions. Findings under an approved exception that has not expired never count.
Overall result. The scan passes only when every gated technology passes. A scan with no gated technology passes.
Branches and pull requests
Branch (-scmBranchName)
Overall code conditions.
Every open finding of the branch. A gate does not turn green just because the branch was scanned again; findings count until they are fixed.
Pull request with a scanned target branch (-pullRequestId and -pullRequestTargetBranch)
New code conditions. When the gate has none, its Overall code conditions are applied to the new code.
Only findings that are not open on the target branch.
Pull request without a target branch, or whose target branch was never scanned
Overall code conditions.
Every finding, as for a branch.
Define New code conditions in Quality Gates to hold pull requests to a stricter standard than the whole branch, for example "0 new Major issues". See Pull Request Analysis.
Fail the build
The scanner writes the result to its log as the last gate line:
or QUALITY GATE STATUS:: FAILED. When the server cannot return a status, the log says Could not get the quality gate status from IZ Suite with the reason, and there is no status line.
There are two ways to fail the step. The simplest is -abortOnQualityGateFailure true: the scanner then exits with code 1 when the gate failed or no status came back, and logs Aborting the build due to Quality Gate failure (or Could not get the quality gate status from IZ Suite ... Failing the build because abortOnQualityGateFailure is set.).
The steps that Setup generates do it the other way: they send the output to a file and fail the step unless the PASSED line is there:
The grep fails the step when the gate failed, when no status came back and when the scan stopped with an error. Setup adds this line when Fail the build when the quality gate fails is on.
Add -DabortOnQualityGateFailure=true (or <abortOnQualityGateFailure>true</abortOnQualityGateFailure> in the plugin configuration). The goal then fails the Maven build with Scan failed when the gate failed or no status came back:
Without it, the Maven build passes whatever the gate result.
See why the gate failed
Open the link the scanner logs after
Browse the project results at ::, or open the branch from Workspaces → Code Analysis → Branches & baselines.In the branch dossier, open Posture & evidence.
Under Why this recorded gate failed — or what is still unknown, expand each technology to see the conditions it missed, for example "4 - Critical Issues is not equal to configured value of 0".
Click Investigate issues to work through the findings.
To accept a finding instead of fixing it, use Actions → Exceptions in the dossier. Findings under an approved, unexpired exception do not count when the gate is judged.
Next steps
Quality Gates: change the conditions and which organizations use a gate.
Pull Request Analysis: judge pull requests on new code.
Branches & Baselines: open the branch dossier.
CI/CD Integration: how a pipeline scan works.
Last updated
Was this helpful?

