URL Callouts + Webhooks API

Updated 1 month ago by Copado Solutions

Copado allows you to use a URL Callout deployment step in conjunction with the Webhooks API to execute a wide range of jobs and bring a lot of power to your deployments. You will be able to run any Copado job accessible via the Webhooks API. The deployment step will wait for its completion and will succeed or fail depending on the result of the job. Take a Git snapshot before and/or after deploying metadata.

Let’s take a look at the different jobs you can execute with this type of deployment step:

  • Run Continuous Integration: For existing continuous integrations, you can use this webhook to start a new build task and immediately deploy/validate from Git. This is the webhook url that is also found on the Continuous Integration record, and which can be pasted into a Git server hook configuration. 
  • Run all Org’s Apex Test: Use this webhook to run all Apex tests on an existing org credential. When you select this step, you are prompted to select an org credential that will be the org credential where Apex tests will be executed:

  • Run Selenium Test: You can use this webhook to start a new test execution for existing Selenium test runs. This is the webhook url that is also found on the Selenium Test Run record and which can be pasted into a Git server hook configuration, or as a Copado Continuous Integration pre/post deployment job.
  • Run Selenium Group: You can use this webhook to start a new test execution for existing Selenium test groups. This is the webhook url that is also found on the Selenium Test Group record and which can be pasted into a Git server hook configuration, or as a Copado Continuous Integration pre/post deployment job.
  • Take a Git Snapshot: Use this webhook to take a snapshot.
  • Calculate Org Differences: Use this webhook to re-calculate differences in an existing org difference.
  • Execute a Deployment: Use this webhook to execute an existing deployment.
  • Calculate and deploy an Org Difference: Use this webhook to re-calculate org differences in an existing org difference and immediately deploy them.
  • Calculate snapshot differences: Use this webhook to re-calculate differences in an existing snapshot difference.
  • Calculate and deploy a Snapshot Difference: Use this webhook to re-calculate snapshot differences in an existing snapshot difference and immediately deploy them.
  • Refresh Org’s metadata cache: Refresh the metadata index for a given org credential.
  • Retrieve Commits: Use this webhook to retrieve/import the latest commits from the Git repository and save them under the Snapshot Commits related list of an existing Git Snapshot record.
  • Recalculate Pipeline Branch Statuses: Use this webhook to recalculate the status of branches in an existing pipeline.
    This is no longer required If you are in v12 or later as the new default calculation logic for the Pipeline page is based on user stories.
  • Run Compliance Scan on Org Credential: Use this webhook to run a compliance scan on an existing org credential.
  • Run Compliance Scan on Git Snapshot:  Use this webhook to run a compliance scan on an existing Git snapshot.
  • Deploy a Promotion: Use this webhook to create a new deployment to deploy an existing promotion.
  • Static Code Analysis on Org Credential: Use this webhook to run static code analysis on an existing org credential.
  • Static Code Analysis on User Story: Use this webhook to run static code analysis on a user story.
  • Install Package Version: Use this webhook to install a new package version in the destination organization. Copado will upgrade the package in the destination organization or install it if it hasn’t been installed yet. All you need to do is include the id of the Package Version record for the package version you want to install:

For more information about how to create a URL Callout deployment step to use these webhooks, refer to the article Deployment Step: URL Callout.


How did we do?