Setup Webhooks
At the moment webhooks are still in beta, you can still use them though you will need to contact us to enable/configure them.
Overview
Webhooks allow you to integrate your custom processes with MDOQ.
A webhook can trigger multiple events.
Each event has it's own configuration and own webhook history. Some events can trigger different behaviour based on the "data" in the webhook history.
For example you might set up 2 webhooks, one that listens for events to post to slack e.g "Instance created" or "Passed regression testing". Another that listens for events within a release, e.g "Before doing release make sure x"
All events send json payload and expect to recieve json in response.
Security
To ensure that your endpoints are protected when calling them MDOQ will provide a secret that you have chosen in the header as well as in the post value.
For example, if your secret was mdoq-is-awesome
the request that hits your endpoint will contain:
- a header of:
x-mdoq-secret: mdoq-is-awesome
- a post variable of:
"secret": "mdoq-is-awesome"
We also recommend you restrict access by IP address.
The MDOQ IPs can be found here
Common Configuration
- Blocking:
Some events will have a 'blocking' option, when enabled MDOQ will halt whatever the process is that triggered the event, until a lock as been removed. The lock will be provided as a post variable"lock": "some:lock:value"
Events
Before Release
- When: This event is fired after a user clicks "Perform Release" but before any of the release process has begun.
- Configuration:
- Extended Behaviour
- Cancel release
If the webhook history result is "fail" and the valuestop_release
is present and set totrue
in the webhook history. The release will be cancelled. No action will be taken to undo any steps taken. - Rollback release
If the webhook history result is "fail" and the valuerollback_release
is present and set totrue
in the webhook history. The release will be cancelled. MDOQ will attempt to undo any steps taken in the release process.
- Cancel release
Before Release Complete
- When: This event is fired just before MDOQ deems the release a success. At this point the full release process has been carried out.
- Configuration:
- Extended Behaviour
- Cancel release
If the webhook history result is "fail" and the valuestop_release
is present and set totrue
in the webhook history. The release will be cancelled. No action will be taken to undo any steps taken. - Rollback release
If the webhook history result is "fail" and the valuerollback_release
is present and set totrue
in the webhook history. The release will be cancelled. MDOQ will attempt to undo any steps taken in the release process.
- Cancel release