Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
bb7d2e8d
Commit
bb7d2e8d
authored
Jul 02, 2021
by
Marius Bobin
Committed by
Marcel Amirault
Jul 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add example for restricting downstream pipeline variables with inherit
parent
fee3f45d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
doc/ci/pipelines/multi_project_pipelines.md
doc/ci/pipelines/multi_project_pipelines.md
+15
-0
No files found.
doc/ci/pipelines/multi_project_pipelines.md
View file @
bb7d2e8d
...
...
@@ -154,6 +154,21 @@ trigger-downstream:
trigger
:
my/project
```
You can stop global variables from reaching the downstream pipeline by using the
[
`inherit` keyword
](
../yaml/index.md#inherit
)
.
In this example, the
`MY_GLOBAL_VAR`
variable is not available in the triggered pipeline:
```
yaml
variables
:
MY_GLOBAL_VAR
:
value
trigger-downstream
:
inherit
:
variables
:
false
variables
:
MY_LOCAL_VAR
:
value
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. For example:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment