diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-05-28 15:06:39 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-05-28 15:14:31 +0200 |
commit | ced2b8f888987fb9a47c9267df129c60953ac2a3 (patch) | |
tree | a24d082a5a0c2f4b89a1cdc0efd530e82da53155 | |
parent | d79a3e1eaf5b7035eadfe050f85f1fa0cfcf3645 (diff) | |
download | gitlab-ce-docs/gb/expand-downstream-pipeline-variables.tar.gz |
Copy-edit docs for cross-project pipeline variablesdocs/gb/expand-downstream-pipeline-variables
-rw-r--r-- | doc/ci/multi_project_pipelines.md | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/doc/ci/multi_project_pipelines.md b/doc/ci/multi_project_pipelines.md index 020a0947dae..e9deabf27f8 100644 --- a/doc/ci/multi_project_pipelines.md +++ b/doc/ci/multi_project_pipelines.md @@ -134,32 +134,33 @@ 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 scenario `MY_VARIABLE` is also going to be passed downstream, -because job-level `variables` inherit values from top-level `variables`: +In the following configuration, the `MY_VARIABLE` variable will be passed +downstream, because jobs inherit variables declared in top-level `variables`: ```yaml variables: MY_VARIABLE: my-value -downstream: +my-pipeline: variables: ENVIRONMENT: something trigger: my/project ``` -You might want to pass some information about the upstream pipeline, using, -for example, predefined variables. In order to do that you can use -interpolation to pass any variable: +You might want to pass some information about the upstream pipeline using, for +example, predefined variables. In order to do that, you can use interpolation +to pass any variable. For example: ```yaml -downstream: +my-pipeline: variables: UPSTREAM_BRANCH: $CI_COMMIT_REF_NAME trigger: my/project ``` -`UPSTREAM_BRANCH` will be passed to a downstream pipeline and will be -available within the context of all downstream builds. +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 +within the context of all downstream builds. ### Limitations |