Search code examples
deploymentwebhooksmustacheappveyor

How do I get the deploy number for an AppVeyor webhook notification?


I have an environment in appveyor that I deploy to. I've configured a custom notification message that gets posted to a webhook to update the team on the deploy status. I've got the message tailored exactly how I want it except for one thing. I want to link to the appveyor deploy success/fail page. The url looks like this:

https://ci.appveyor.com/project/MeTheUser/myProject/deployment/12345678

I want the number at the end there. But I can't figure out the correct mustache template property to get. I've read the documentation here: https://www.appveyor.com/docs/notifications/#webhook-payload-default

and there's a line that says for deploy notifications, you just append build. to the front of the property. So, for example, {{build.projectName}} instead of {{projectName}}. But I don't see a property that would match since this is a deploy, not a build.

There's also a github issue to document this, but it doesn't look like it's getting done anytime soon.

Anyone know what I can do?


Solution

  • Use {{ deploymentId }} to get that deployment number or {{ deploymentUrl }} to get the entire deployment URL.