Overriding AppVeyor environment variables

Luke's Avatar


18 Nov, 2017 04:31 PM

Would it be possible to override the AppVeyor environment variables? I'm looking for a way to set a custom message when trigger a build on another project using the AppVeyor API, but the only option it has is to set variables, but the already defined AppVeyor ones do not seem to work or are being set again after being set via the API.

APPVEYOR_REPO_COMMIT_MESSAGE and APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED would be what I'd want to override, which I've tried as env:APPVEYOR_REPO_COMMIT_MESSAGE and without the env.

  1. Support Staff 1 Posted by Ilya Finkelshte... on 18 Nov, 2017 08:48 PM

    Ilya Finkelshteyn's Avatar

    Hi Luke,

    This environment variable is being set to commit message from specific commit on GitHub (or other source control provider). However you can do the following:

    • Set custom environment variable, say MY_COMMIT_MESSAGE when starting build with API.

    • At init stage if MY_COMMIT_MESSAGE is not null, run update build details with Worker API, e.g.

    - ps: if($env:MY_COMMIT_MESSAGE) {Update-AppveyorBuild -Message $env:MY_COMMIT_MESSAGE}
  2. 2 Posted by Luke on 04 Jan, 2018 09:48 PM

    Luke's Avatar

    Hi Ilya, thanks for the tip! I didn't think about using it that way but it's working great!

  3. Luke closed this discussion on 04 Jan, 2018 09:48 PM.

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