Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ci/yaml/index.md')
-rw-r--r--doc/ci/yaml/index.md25
1 files changed, 23 insertions, 2 deletions
diff --git a/doc/ci/yaml/index.md b/doc/ci/yaml/index.md
index 3882bc67199..cdb6dc88446 100644
--- a/doc/ci/yaml/index.md
+++ b/doc/ci/yaml/index.md
@@ -414,12 +414,33 @@ All pipelines are assigned the defined name. Any leading or trailing spaces in t
**Possible inputs**:
- A string.
+- [CI/CD variables](../variables/where_variables_can_be_used.md#gitlab-ciyml-file).
+- A combination of both.
+
+**Examples of `workflow:name`**:
+
+A simple pipeline name with a predefined variable:
+
+```yaml
+workflow:
+ name: 'Pipeline for branch: $CI_COMMIT_BRANCH'
+```
-**Example of `workflow:name`**:
+A configuration with different pipeline names depending on the pipeline conditions:
```yaml
+variables:
+ PIPELINE_NAME: 'Default pipeline name'
+
workflow:
- name: 'Pipeline name'
+ name: '$PIPELINE_NAME'
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+ variables:
+ PIPELINE_NAME: 'MR pipeline: $CI_COMMIT_BRANCH'
+ - if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-in-ruby3/'
+ variables:
+ PIPELINE_NAME: 'Ruby 3 pipeline'
```
#### `workflow:rules`