CloudDM 4.8.0 adds GreptimeDB as a DataSource
Skip to main content

Trigger a change

Start a change with a webhook, a remote request from a program or script, or Trigger Change on the change flow's details page.

info

Each change flow processes one change at a time, regardless of trigger method.

  • If SQL execution has already started, another trigger creates a new change record that includes the error and its cause.
  • If SQL execution is still pending, another trigger restarts the in-progress change from the first stage.

Webhook​

Configure a webhook​

  1. Open CI/CD in the sidebar and select the target change flow.
  2. Open Configuration Items > Trigger Settings and click View Configuration.
  3. Open the WebHook tab and enable the webhook.
  4. Copy the URL and configure the webhook authentication. For GitLab signing tokens, follow the GitLab instructions. For secret-token authentication, enter the CloudDM Secret in the repository webhook settings.
  5. Return to CloudDM and save the trigger settings.

A Git webhook triggers CloudDM to apply a database change and continue the CI/CD pipeline.

The Git service calls the webhook for the configured push or pull request event. CloudDM checks and processes the new SQL. If you configure a callback, CloudDM notifies the external CI/CD system when execution finishes.

info

See the setup guides for GitLab Self-Managed and Gitee.

Remote trigger​

A remote trigger uses an HTTP request to start a change from a script or an existing CI/CD pipeline.

Configure a remote trigger​

  1. Open CI/CD in the sidebar and select the target change flow.
  2. Open Configuration Items > Trigger Settings and click View Configuration.
  3. Open the Remote tab and enable the remote trigger.
  4. Choose HTTP(GET), wget, or curl.
  5. Choose Text or Json and copy the generated remote trigger address.
  6. Save the trigger settings.

CloudDM displays the token and the full trigger address. A request to that address makes CloudDM check the flow's repository for new SQL.

A Jenkins job uses curl or wget to trigger a CloudDM database change before continuing deployment.

Console​

A user starts a database change from the CloudDM console before the deployment pipeline continues.

  1. Sign in to the CloudDM console.
  2. Open CI/CD in the sidebar.
  3. Select the target change flow and click Trigger Change.
  4. Confirm the trigger. CloudDM starts checking and processing new SQL.
  5. If you configure a callback, CloudDM notifies the external CI/CD system when the change finishes.