Can we set arbitrary environment variables to scheduled build?

TAMAGAWA Hiroko's Avatar


19 Aug, 2019 05:03 AM


I'm using AppVeyor for the first time.
We have a nodejs project whose E2E test requires long time and we wouldn't like execute it every time we push the codes.
So our ideal build flow is like these:

1. Check only if we can build a package without errors for every push of every branch (including develop)
2. When developers want to execute E2E test, they call AppVeyor REST API with a specific environment variable so that they can invoke tests.
3. Execute E2E test nightly by scheduled build on develop branch.

No. 1 & 2 can be realized, but I couldn't find a way to resolve No.3 because it seems builds for 1 & 3 are executed under same conditions. Is there any good ways to do that?

  1. 1 Posted by Owen McDonnell on 19 Aug, 2019 03:57 PM

    Owen McDonnell's Avatar

    The variable APPVEYOR_SCHEDULED_BUILD is set as true if a build is scheduled. So you should be able to create some simple script solution like if (($env:<your_var> -eq "true") -Or ($env:APPVEYOR_SCHEDULED_BUILD -eq "true")) { <test_command> }

  2. 2 Posted by TAMAGAWA Hiroko on 20 Aug, 2019 12:10 AM

    TAMAGAWA Hiroko's Avatar

    Thanks! Very helpful.

  3. Owen McDonnell closed this discussion on 20 Aug, 2019 03:23 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