diff options
Diffstat (limited to 'doc/ci/yaml/includes.md')
-rw-r--r-- | doc/ci/yaml/includes.md | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/doc/ci/yaml/includes.md b/doc/ci/yaml/includes.md index 35b302d0373..69595b62de2 100644 --- a/doc/ci/yaml/includes.md +++ b/doc/ci/yaml/includes.md @@ -418,6 +418,8 @@ these keywords: ### `include` with `rules:if` +> Support for `when: never` and `when:always` [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/348146) in GitLab 16.1 [with a flag](../../administration/feature_flags.md) named `ci_support_include_rules_when_never`. Disabled by default. + Use [`rules:if`](index.md#rulesif) to conditionally include other configuration files based on the status of CI/CD variables. For example: @@ -425,6 +427,14 @@ based on the status of CI/CD variables. For example: include: - local: builds.yml rules: + - if: $DONT_INCLUDE_BUILDS == "true" + when: never + - local: builds.yml + rules: + - if: $ALWAYS_INCLUDE_BUILDS == "true" + when: always + - local: builds.yml + rules: - if: $INCLUDE_BUILDS == "true" - local: deploys.yml rules: @@ -437,6 +447,8 @@ test: ### `include` with `rules:exists` +> Support for `when: never` and `when:always` [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/348146) in GitLab 16.1 [with a flag](../../administration/feature_flags.md) named `ci_support_include_rules_when_never`. Disabled by default. + Use [`rules:exists`](index.md#rulesexists) to conditionally include other configuration files based on the existence of files. For example: @@ -445,6 +457,16 @@ include: - local: builds.yml rules: - exists: + - exception-file.md + when: never + - local: builds.yml + rules: + - exists: + - important-file.md + when: always + - local: builds.yml + rules: + - exists: - file.md test: @@ -508,7 +530,7 @@ When the pipeline runs, GitLab: > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/391331) in GitLab 15.11 as a Beta feature. FLAG: -`spec` and `with` are experimental [Open Beta features](../../policy/alpha-beta-support.md#beta) +`spec` and `with` are experimental [Open Beta features](../../policy/experiment-beta-support.md#beta) and subject to change without notice. ### Define input parameters with `spec:inputs` |