CloudDM 4.8.0 adds GreptimeDB as a DataSource
Skip to main content

Database CI/CD overview

Production releases often handle database changes and application deployment separately. A DBA may need to approve the database changes, while existing CI/CD tools deploy the application. CloudDM connects the two so teams can check, approve, and execute database changes before continuing the application release.

A repository or CI/CD tool triggers CloudDM. CloudDM checks, approves, and applies database changes, then sends an HTTP callback to the application release pipeline.

  • Trigger database changes through a webhook, remote request, or the console.
  • After executing a database change, CloudDM can send a callback so the external CI/CD system can continue the release.
  • SQL can go through security checks and ticket approval before execution.

Core concepts​

  • A change flow defines the change source, target database, trigger, execution policy, and notifications for ongoing database changes.
  • A change is the smallest unit of database CI/CD execution. An ordinary change goes through submission, SQL review, ticket approval, and execution. CloudDM can close a change when it finds no new SQL. Building a baseline follows the snapshot change path.

How it works​

A change flow applies new SQL from a source repository to a target database. Once triggered, CloudDM processes the change in four stages.

  1. Submit retrieves SQL from the repository and compares it with the existing snapshot to identify new SQL.
  2. SQL Review checks the new SQL against the security rule assigned to the target database's environment. See Assign a security rule to an environment.
  3. Work Order Approval starts the change ticket workflow assigned to the target database's environment. See Ticket settings.
  4. Execute applies the approved SQL to the target database according to the change flow's execution policy.

Limits​

  • SQL repositories can use GitLab Self-Managed or Gitee.
  • A repository can contain multiple SQL files. CloudDM sorts them by path and file name to determine execution order.
  • CloudDM processes files with the .sql extension.
  • Append new SQL to the end of an existing or new .sql file. CloudDM detects additions at the end of the file.
  • Each change flow can have one change in progress at a time.
  • Only one enabled change flow can use a given repository, branch, target DataSource, and database or schema combination.