Skip to content

Add scope parameter for a quality gate

Current situation

We have a mandatory scope parameter for each rule of a quality gate, but we cannot define a scope at the quality gate level.

Desired outcome

An optional scope parameter for a quality gate. If not set, it defaults to default_scope parameter from the plugin configuration.

Example

When the quality gate quality.gate is applied to a workflow, rules foo and bar results are calculated for Robot Framework tests only.

qualitygates:
  - name: quality.gate
    scope: test.technology=='robotframework'
    rules: 
      - name: foo
        rule:
          scope: contains(test.runs-on, 'foo')
          threshold: 77%
      - name: bar
        rule:
          scope: contains(test.runs-on, 'bar')
          threshold: 66%