Now have support for Webhooks within a Canary Deployment Strategy


It is now possible to leverage a Webhook within a canary deployment strategy. It is not yet possible to leverage them anywhere else. We are still working to document this functionality, but in the meantime, below is an example of how to use a webhook to invoke a github action. An example github action it triggers, than then continues the deployment can be found here: https://github.com/armory-io/borealis-demo/blob/main/.github/workflows/webhookCallback.yml.
webhook definition:
add this as a top-level element in the yaml to define named webhooks you can invoke from elsewhere in your deploy.yml
webhooks:
- name: myWebhook
method: POST
uriTemplate: https://api.github.com/repos/armory-io/peacemaker-webhooks-demo/dispatches
networkMode: direct
headers:
- key: Authorization
value: token ghp_notarealtoken
- key: Content-Type
value: application/json
bodyTemplate:
inline: >-
{
"event_type": "webhookCallback",
"client_payload": {
"callbackUri": "{{armory.callbackUri}}/callback"
}
}
Reference a webhook from within a canary strategy:
below is an example of how to reference your webhook from within a canary strategy.
strategies:
strategy1:
canary:
steps:
- setWeight:
weight: 25
- runWebhook:
name: myWebhook
Note: there is a 24 hour timeout after which the web-hook will automatically fail.