Quality Gates

Join the Preview!

Quality Gates is in Preview.

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.

An SCA rule that triggers a failure if any library vulnerabilities with critical or high severity are detected in the repository.

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 Optimization


- New flaky tests
- Code coverage

Static Analysis


- Code vulnerability violations
- Code quality violations

Software Composition Analysis


- Vulnerabilities
- Detected licenses

By integrating Quality Gates into your CI/CD pipelines or allowing the Datadog GitHub integration to create status checks on your Pull Requests automatically (currently available for SCA rules only), 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 or that decreases code coverage.

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

You can create rules to block code from being merged when your repository has a certain number of code quality or code vulnerability violations.

A Quality Gate rule that fails when one or more new code quality violations of error-level severity are contained in the repository

You can create rules to block code from being merged when your repository has a certain number of library vulnerabilities or forbidden licenses.

A Quality Gate rule that fails when one or more critical or high severity library vulnerabilities are contained in the repository

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