---
title: "Deploy rules"
canonical_url: "https://docs.getdx.com/deploy-rules/"
md_url: "https://docs.getdx.com/deploy-rules.md"
last_updated: "2026-11-20"
---

# Deploy rules
Deploy rules allow you to create DX deployments by inferring from CI/CD jobs. Whereas the [deployments.create](https://docs.getdx.com/datacloudapi/methods/deployments.create/) API method is a flexible solution for handling a wide range of deployment mechanisms, inference rules are a no-code solution for simple deployment workflows.

If you use GitHub's built-in deployment events, you can also import deployments directly via the [GitHub Deployments connector](https://docs.getdx.com/connectors/github-deployments/) instead of setting up inference rules. If you deploy production with Vercel, the [Vercel Deployments connector](https://docs.getdx.com/connectors/vercel-deployments/) imports those deployment events directly as well.

> **Note**: Deploy rules work best for small, standardized workflows where one CI/CD workflow maps cleanly to one production service deployment. For monorepos, custom release processes, or workflows that need precise pull request attribution, use [`deployments.create`](https://docs.getdx.com/datacloudapi/methods/deployments.create/) instead.

## Setup instructions

Deployment inference rules are configured in the DX user interface. To set up a rule, specify the following parameters:

1. **Pipeline Source**: Select from connectors you have configured in DX.
1. **CI/CD Level**: See below for the workflow levels supported by DX.
1. **Repository:** Select a repository from the dropdown, or input a regular expression.
1. **Integration branch (optional):** Set this value if you are using a branch to integrate changes before merging to a release branch.
1. **Workflow:** The workflow, pipeline, or stage for which you want a deploy to be generated from.
1. **Target branch:** The Git branch you want to infer deployments from, such as `development`.
1. **Service:** The production service being deployed.

Choose a service level that matches how you want to review DORA metrics. Some teams use repositories; others use components, systems, applications, or another unit of ownership. For guidance on choosing service identifiers and ownership mappings, see [How should I set up the DX catalog for DORA metrics?](https://docs.getdx.com/knowledgebase/how-should-i-set-up-the-dx-catalog-for-dora-metrics/).

## Regular expressions

DX supports regular expressions for creating rules for multiple repositories and/or workflows at once. Below are a few common examples:


| RegEx Expression | Use case |
| ---------------- | ---------------------------------------------------------- |
| `(.*)` | Create a rule that applies to all repositories. |
| `(.*deploy.*)` | Create a rule for all jobs that include the term "deploy". |
| `(^mobile-.*)` | Create a rule for repositories beginning with "mobile-". |


To verify that a deploy inference rule works, trigger a pipeline, workflow, or stage to run on the relevant branch. Then confirm that a deployment was created in DX with a `deployment_inference_rule_id` corresponding to the rule.

## Workflow levels

The second field for an inference rule is the CI/CD level. The table below lists CI/CD levels for each provider, with DX-supported levels highlighted in **bold**:

| Provider            | CI/CD levels                                                 |
| ------------------- | ------------------------------------------------------------ |
| Azure Pipelines     | Project > Repository > **Pipeline** > **Stage** > Job > Step |
| Bitbucket Pipelines | Workspace > Repository > **Pipeline** > Stage > Step         |
| Bitrise             | App > Pipeline > Stage > **Workflow** > Step                 |
| Buildkite           | **Pipeline** > Step > Job                                    |
| CircleCI            | Project > Pipeline > **Workflow** > Job > Step               |
| GitHub              | Repository > **Workflow** > Job > Step                       |
| GitLab              | Project > **Pipeline** > **Stage** > Job                     |
| Harness             | Project > **Pipeline** > **Stage** > Step                    |

## Data backfilling

When you create or update a deploy rule, DX immediately backfills deployments from existing pipeline runs that match the rule. This usually completes in under 2 minutes, and can take up to 10 minutes for larger datasets.
---

## Sitemap

[Overview of all docs pages](/llms.txt)
