Commit 2023ffd8 authored by Suzanne Selhorn's avatar Suzanne Selhorn

Merge branch 'docs-rules-nesting' into 'master'

Tweak nesting of rules sections

See merge request gitlab-org/gitlab!39243
parents 238e9a88 6f93eae7
...@@ -1255,7 +1255,7 @@ Also, we don't recommend mixing `only/except` jobs with `rules` jobs in the same ...@@ -1255,7 +1255,7 @@ Also, we don't recommend mixing `only/except` jobs with `rules` jobs in the same
It may not cause YAML errors, but debugging the exact execution behavior can be complex It may not cause YAML errors, but debugging the exact execution behavior can be complex
due to the different default behaviors of `only/except` and `rules`. due to the different default behaviors of `only/except` and `rules`.
##### `rules:if` #### `rules:if`
`rules:if` clauses determine whether or not jobs are added to a pipeline by evaluating `rules:if` clauses determine whether or not jobs are added to a pipeline by evaluating
a simple `if` statement. If the `if` statement is true, the job is either included a simple `if` statement. If the `if` statement is true, the job is either included
...@@ -1384,7 +1384,7 @@ rules: ...@@ -1384,7 +1384,7 @@ rules:
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_BEFORE_SHA != '0000000000000000000000000000000000000000' - if: $CI_COMMIT_BRANCH && $CI_COMMIT_BEFORE_SHA != '0000000000000000000000000000000000000000'
``` ```
##### `rules:changes` #### `rules:changes`
To determine if jobs should be added to a pipeline, `rules: changes` clauses check To determine if jobs should be added to a pipeline, `rules: changes` clauses check
the files changed by Git push events. the files changed by Git push events.
...@@ -1419,7 +1419,7 @@ In this example: ...@@ -1419,7 +1419,7 @@ In this example:
To implement a rule similar to [`except: changes`](#onlychangesexceptchanges), To implement a rule similar to [`except: changes`](#onlychangesexceptchanges),
use `when: never`. use `when: never`.
##### `rules:exists` #### `rules:exists`
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24021) in GitLab 12.4. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24021) in GitLab 12.4.
...@@ -1453,7 +1453,7 @@ NOTE: **Note:** ...@@ -1453,7 +1453,7 @@ NOTE: **Note:**
For performance reasons, using `exists` with patterns is limited to 10000 For performance reasons, using `exists` with patterns is limited to 10000
checks. After the 10000th check, rules with patterned globs will always match. checks. After the 10000th check, rules with patterned globs will always match.
##### `rules:allow_failure` #### `rules:allow_failure`
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/30235) in GitLab 12.8. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/30235) in GitLab 12.8.
......
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