Commit 8e3fe5d3 authored by Marcel Amirault's avatar Marcel Amirault

Merge branch 'workflow-rules-ci-docs' into 'master'

workflow:rules documentation

Closes #36517

See merge request gitlab-org/gitlab!20587
parents 40d7fc1c da4e2807
......@@ -1024,6 +1024,33 @@ Additional job configuration may be added to rules in the future. If something
useful isn't available, please
[open an issue](https://gitlab.com/gitlab-org/gitlab/issues).
### `workflow:rules`
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/29654) in GitLab 12.5
The top-level `workflow:` key applies to the entirety of a pipeline, and will
determine whether or not a pipeline is created. It currently accepts a single
`rules:` key that operates similarly to [`rules:` defined within jobs](#rules),
enabling dynamic configuration of the pipeline.
The configuration options currently available for `workflow:rules` are:​
- [`if`](#rulesif): Define a rule.
- [`when`](#when): May be set to `always` or `never` only. If not provided, the default value is `always`​.
The list of `if` rules is evaluated until a single one is matched. If none
match, the last `when` will be used:
```yaml
workflow:
rules:
- if: $CI_COMMIT_REF_NAME =~ /-wip$/
when: never
- if: $CI_COMMIT_TAG
when: never
- when: always
```
### `tags`
`tags` is used to select specific Runners from the list of all Runners that are
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment