Meaning of "global:" in "environment:" of appveyor.yml
https://www.appveyor.com/docs/appveyor-yml has a commented-out example that uses the section "global:" inside "environment:", but it doesn't explain the significance of having environment variables declared inside this "global:" section versus simply declaring environment variables directly inside "environment:".
For example:
environment:
my_var1: value1
global:
my_var2: value2
What's the difference between my_var1 that's declared under environment and my_var2 that's declared inside global?
Many thanks,
Vitaly
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 18 Mar, 2016 02:52 AM
"global:" is used together with "matrix:" and allows defining variables for all matrix permutations.
-Feodor
2 Posted by wtf? on 07 Nov, 2017 12:44 PM
So variables inside `environment:` aren't visible inside matrix jobs?
3 Posted by Ilya Finkelshte... on 07 Nov, 2017 10:45 PM
Actually you are correct, environment variables from
environment
andenvironment/global
works the same way with matrix now. But we support thisenvironment/global
for historical reasons and also it is considered clearer expression when matrix exist in the configuration.Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:21 AM.