Commit bb7d2e8d authored by Marius Bobin's avatar Marius Bobin Committed by Marcel Amirault

Add example for restricting downstream pipeline variables with inherit

parent fee3f45d
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment