Incorrect documentation concerning env vars

Björn Fredberg's Avatar

Björn Fredberg

30 Apr, 2020 09:17 AM

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

  1. Support Staff 1 Posted by Feodor Fitsner on 30 Apr, 2020 05:30 PM

    Feodor Fitsner's Avatar

    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 under provider are used as settings for that deployment provider.

  2. 2 Posted by Björn Fredberg on 04 May, 2020 06:27 AM

    Björn Fredberg's Avatar

    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

  3. Support Staff 3 Posted by Feodor Fitsner on 04 May, 2020 04:36 PM

    Feodor Fitsner's Avatar

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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