Webhook deployment provider doesn't send Environment vars

Rasmus Lauridsen's Avatar

Rasmus Lauridsen

06 May, 2015 11:29 AM


I've just run a little test on the Webhook environment provider.
It looks like environment variables are not sent in the json payload?
I can define them in the interface but they do not go into the payload.


Rasmus Lauridsen

  1. Support Staff 1 Posted by Feodor Fitsner on 07 May, 2015 01:46 AM

    Feodor Fitsner's Avatar

    Hi Rasmus,

    Yes, webhook provider doesn't include environment variables into request payload.

    If you are calling it during the build you can easily replace most of its functionality with a simple PowerShell call.

    Alternatively, you can pass custom values in the URL:

    url: http://mywebhook.server.com/page?var1=$(var1)&var2=$(var2)&...

    where var1 and var2 are environment variables.

  2. 2 Posted by Rasmus Lauridse... on 07 May, 2015 07:47 AM

    Rasmus Lauridsen's Avatar

    Hi Feodor thanks for the quick reply

    I'm not sure we are talking about the same Webhook :-)

    When I set up a Deployment Environment ( https://ci.appveyor.com/environments )
    I can define Environment variables, but these variables are not usable in any way since they don't get sent with the webhook. So either the environment variables should not be part of the UI or they should be forwarded somehow.

    We had also come up with the same workaround as you mention, we could just define them as values on the url, but that is not very readable or dev friendly, it is easier to understand the environment variables which are already part of the UI.

    Would also be cool if the environment variables automagically got added to the url as query params to the webhook.

  3. Support Staff 3 Posted by Feodor Fitsner on 07 May, 2015 04:49 PM

    Feodor Fitsner's Avatar

    That what I meant - sending those variables in request parameters.

    Take a look at the attached screenshot. This is the results of webhook call: http://requestb.in/x3hy75x3?inspect

  4. 4 Posted by Rasmus Lauridse... on 08 May, 2015 11:25 AM

    Rasmus Lauridsen's Avatar

    ahh cool :-)

    that should work

    thank you

  5. Rasmus Lauridsen closed this discussion on 08 May, 2015 11:25 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