diff options
author | Evan Read <eread@gitlab.com> | 2019-06-05 18:30:55 +0000 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2019-06-05 18:30:55 +0000 |
commit | 717f43e3a0a21664062e74eb2109145f1902b4f7 (patch) | |
tree | 22c975dabf9eb971ea0b53d906650c4a0a4de0d6 | |
parent | 5fa1bd605bfe36d05e4357d83f5a481d3f47d354 (diff) | |
download | gitlab-ce-717f43e3a0a21664062e74eb2109145f1902b4f7.tar.gz |
Edit downstream variable content
-rw-r--r-- | doc/ci/multi_project_pipelines.md | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/ci/multi_project_pipelines.md b/doc/ci/multi_project_pipelines.md index bcd92243d97..40638d151c4 100644 --- a/doc/ci/multi_project_pipelines.md +++ b/doc/ci/multi_project_pipelines.md @@ -138,14 +138,15 @@ staging: The `ENVIRONMENT` variable will be passed to every job defined in a downstream pipeline. It will be available as an environment variable when GitLab Runner picks a job. -In the following configuration, the `MY_VARIABLE` variable will be passed -downstream, because jobs inherit variables declared in top-level `variables`: +In the following configuration, the `MY_VARIABLE` variable will be passed to the downstream pipeline +that is created when the `trigger-downstream` job is queued. This is because `trigger-downstream` +job inherits variables declared in global variables blocks, and then we pass these variables to a downstream pipeline. ```yaml variables: MY_VARIABLE: my-value -my-pipeline: +trigger-downstream: variables: ENVIRONMENT: something trigger: my/project @@ -156,14 +157,14 @@ example, predefined variables. In order to do that, you can use interpolation to pass any variable. For example: ```yaml -my-pipeline: +downstream-job: variables: UPSTREAM_BRANCH: $CI_COMMIT_REF_NAME trigger: my/project ``` In this scenario, the `UPSTREAM_BRANCH` variable with a value related to the -upstream pipeline will be passed to a `downstream` job, and will be available +upstream pipeline will be passed to the `downstream-job` job, and will be available within the context of all downstream builds. ### Limitations |