External Automation Approval Using Webhooks Overview

Learn about integrating webhook-based approvals into your Armory CD-as-a-Service app deployment process. Review use cases and see how webhook-based approval works to automatically continue or roll back your deployment.

When you should use webhook-based approvals

You can think of webhook-based approvals as a generic extensibility layer that enables you to call any API in any internet-accessible system. You can use a webhook to obtain a decision from a process that is external to CD-as-a-Service.

Webhook use cases

Before deployment

  • Upgrade a database schema
  • Custom approval process

Within your deployment strategy

  • Check logs and system health
  • Run custom tests

After deployment

  • Run integration tests in a staging environment
  • Perform metric tests
  • Run security scanners

How webhook-based approval works

In order to accommodate a long-running process, CD-as-a-Service supports the asynchronous webhook with callback pattern. You define the webhook in your deployment file and add a webhook call in the constraints section of your deployment definition or in a canary step.

Basic flow

The deployment process:

  1. Encounters a webhook configuration
  2. Calls the external API, passing the callback URI
  3. Pauses deployment while waiting for the callback
  4. Receives and processes callback
    • Success: deployment proceeds
    • Failure: deployment rolls back
External Process
Success: true
Success: false
External API
Receives Request
Process Runs
Callback to Deployment
Deployment Starts
Webhook Call Triggered
Deployment Pauses
Did the external process
succeed or fail?
Deployment Continues
Deployment Rolls Back

What’s next


Last modified July 20, 2023: (37290cf)