Quality Gates

Quality Gates is not available in the selected site () at this time.

Overview

Quality Gates allow you to control software quality by configuring rules to block substandard code from deployment. You have control over what is merged into the default branch and deployed to production, and can ensure that the code running in production adheres to high quality standards, reducing incidents and minimizing unwanted behaviors.

A pipeline rule that fails when code coverage for PCT is below or equal to zero in Quality Gates

Use Quality Gates to:

  • Create rules that block workflows using data in Datadog, ensuring that only code that meets your standards end up in production.
  • Give your organization the ability to decide what code makes it to production, enhancing your deployment discipline and mitigating potential issues in live environments.
  • Continually improve code quality and system performance with precise enforcement and customizable rules.

You can configure Quality Gates rules for the following categories:

Test Visibility


- New flaky tests
- Performance regressions
- Code coverage

Pipeline Visibility


- Custom measures

Static Analysis


- Code vulnerability violations
- Code quality violations

Software Composition Analysis


- Vulnerabilities
- Detected licenses

By integrating Quality Gates into your CI/CD pipelines, you can create a robust framework for maintaining and improving software quality that aligns with your organization’s operational goals and business objectives.

Setup

Quality Gates offers the following rule types:

You can create rules to block code from being merged that introduces new flaky tests.

A Quality Gate rule that blocks when one or more flaky tests occur

You can create rules to block code from being merged that introduces issues that wouldn’t normally fail your CI/CD pipelines, but end up being deployed to production.

A Quality Gate rule that fails when code coverage for PCT is below or equal to zero for a CI pipeline

You can create rules to block code from being merged that introduces code quality and code vulnerability violations.

A Quality Gate rule that fails when one or more new code quality violations with errors occur

You can create rules to block code from being merged that introduces software vulnerabilities and forbidden licenses.

A Quality Gate rule that fails when one or more new critical vulnerabilities are introduced

To create a Quality Gate rule, see the Setup documentation.

Search rules

You can evaluate and update quality control processes by accessing Quality Gates rules on the Quality Gates Rules page. Improve your deployment practices based on your project requirements and desired performance outcomes.

List of Quality Gate rules in Datadog

To search for Quality Gate rules, see the Search and Manage documentation.

Analyze executions in the Quality Gates Explorer

You can search and filter for quality gates or rule executions, create visualizations, and export saved views of your search query on the Quality Gates Executions page.

Quality Gate results in the Quality Gates Explorer
Quality Gate rule execution results in the Quality Gates Explorer

For more information, see the Quality Gates Explorer documentation.

Track changes in rules

You can view information about who created, modified, and deleted Quality Gates rules in Audit Trail.

A Quality Gates event in Datadog Audit Trail

For more information, see the Audit Trail documentation.

Further Reading