Incorrect documentation concerning env vars
Hi,
I've been working on migrating UI environment variables to yaml and have finally gotten it to work (yay!)
However, while testing back and forth I noticed that the documentation doesn't match how environment variables are read from the appveyor.yml.
In documentation (https://www.appveyor.com/docs/appveyor-yml/):
- provider: Environment
name: staging
on:
branch: staging
env_var1: value1
env_var2: value2
Placing env vars under "on" gave the error message "Environment deployment has been skipped as environment variable has not matched ("env_var1" is "", should be "value1")". (values changed to match dokumentation)
What eventually worked was:
- provider: Environment
name: staging
env_var1: value1
env_var2: value2
on:
branch: staging
That is, directly placed under "provider" instead of under "on".
Is this an error in the documentation or am I missing something?
Also found this article concerning the same error message: https://help.appveyor.com/discussions/questions/5793-overriding-settings-while-deploying-from-build
/Björn
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 30 Apr, 2020 05:30 PM
Those variables under
on
are for skipping deployment, so you can basically tell "run this deployment if only variable X has value Y." where variables underprovider
are used as settings for that deployment provider.2 Posted by Björn Fredberg on 04 May, 2020 06:27 AM
Hej,
Thanks for the clarification. Is this reflected in the documentation?
I didn’t interpret this behavior from the documentation, but I might have missed something.
/Björn
Support Staff 3 Posted by Feodor Fitsner on 04 May, 2020 04:36 PM
There is a note here: https://www.appveyor.com/docs/deployment/#conditional-deployment
Feodor Fitsner closed this discussion on 04 Jul, 2020 09:02 PM.