Quality Gates allows you to gate your workflows based on signals in Datadog. When creating a rule, you can define a rule scope, which states when the rule should be evaluated.
To filter rules that are evaluated for a specific CI pipeline, you can add a custom scope when creating a rule. This process requires you to use the --scope option with the datadog-ci gate evaluate command in your build configuration.
When the datadog-ci gate evaluate command is invoked, the rules having a scope matching the command context are evaluated, and you can filter on rules that tag the backend or frontend teams.
For each scope (for example, branch), you can select included or excluded values.
When included values are selected, the rule is evaluated if one or more included values are part of the command context.
When excluded values are selected, the rule is not evaluated if any of the excluded values are part of the command context.
To create a rule that is evaluated in all branches except main of the example-repository repository, you can create a rule with the following scope.
Click Select when to evaluate.
Enter example-repository in the Repository field and click Include.
Click Add Filter and select Branch.
Enter main in the Branch field and click Exclude.
If a rule does not contain a scope, it is evaluated for all values for that scope.
For example, if a rule does not contain the repository scope, it is evaluated for all repositories.