Meaning of "global:" in "environment:" of appveyor.yml

vitaly.krugl.numenta's Avatar


18 Mar, 2016 12:28 AM 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:

  my_var1: value1

    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,

  1. Support Staff 1 Posted by Feodor Fitsner on 18 Mar, 2016 02:52 AM

    Feodor Fitsner's Avatar

    "global:" is used together with "matrix:" and allows defining variables for all matrix permutations.


  2. 2 Posted by wtf? on 07 Nov, 2017 12:44 PM

    wtf?'s Avatar

    So variables inside `environment:` aren't visible inside matrix jobs?

  3. Support Staff 3 Posted by Ilya Finkelshte... on 07 Nov, 2017 10:45 PM

    Ilya Finkelshteyn's Avatar

    Actually you are correct, environment variables from environment and environment/global works the same way with matrix now. But we support this environment/global for historical reasons and also it is considered clearer expression when matrix exist in the configuration.

  4. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:21 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? 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