CloudDM 4.8.0 adds GreptimeDB as a DataSource
Skip to main content

Change flows

A change flow defines the change source, target database, workflow stages, execution policy, and notifications. The English console calls it a release flow. Each flow keeps its own change history.

A CI/CD trigger starts SQL checks and approval. After both pass, CloudDM executes the SQL and can call back to CI/CD.

A database CI/CD flow can include these stages.

  • CI/CD trigger. A Git service, remote request, or the console starts the change. CloudDM can send a callback to an external CI/CD system when execution finishes.
  • SQL review. CloudDM checks new SQL against the security rule assigned to the target database's environment.
  • Ticket approval. When enabled, CloudDM uses the target database's change ticket workflow for approval.
  • SQL execution. Execution can be automatic, manual, or disabled. With manual execution, you can record work done manually, run SQL immediately, or schedule execution.

Create a change flow​

  1. Sign in to the CloudDM console.
  2. Open CI/CD in the sidebar to view the change flow list.
  3. Click Create Release Flow.
  4. In Basic Information, enter the flow name, description, and manager.
  5. Configure the flow.
    • Change Source. Choose a source type, Git Ops integration, repository, and target branch. Set the script path as needed and choose Push or Pull Request as the trigger.
    • Target Database. Choose the database type, instance, database or catalog when applicable, and schema.
    • Initialization Method. Create a baseline snapshot, generate an initial change, or skip initialization.
  6. Click Next and configure notification channels, messaging services, subscriptions, and execution policy.
  7. Click Finish to create the flow.
info
  • Script Path is relative to the repository root. Leave it blank to include every .sql file in the repository.
  • Target Branch is the branch CloudDM monitors for new SQL.
  • Create Baseline Snapshot records the current SQL scripts as the baseline when the flow is created.
  • Generate Initial Change creates an initial change as soon as the flow is created.
  • Skip Initialization creates the flow and leaves initialization for later.

Execution configuration​

Configure execution in the second step of flow creation or on an existing flow's details page.

  • SQL Check controls when a user must confirm the review result. Choose Always, hint, or block.
  • Work Order Approval enables or disables the change ticket workflow assigned to the target database.
  • Change Execution can be Auto, Manual, or Disabled.
  • Transactional Mode lets you enable transactions for automatic execution.
  • Error Strategy controls whether automatic execution aborts, retries, or ignores errors.

To edit an existing flow, open Configuration Items > Execution Configuration, click View Configuration, make your changes, and save.

info

CloudDM uses the security rule enabled for the target database's environment to check new SQL. See Assign a security rule to an environment.

Trigger a change​

CloudDM supports three ways to trigger a change. Once triggered, CloudDM performs the following steps.

  1. Download the latest code from the target branch.
  2. Scan .sql files under the configured script path.
  3. Compare the results with the existing snapshot to identify new SQL.
  4. If there is new SQL, continue through SQL review, ticket approval, and execution.

Build a snapshot​

Open the change flow's details page, click Build Snapshot, and confirm. CloudDM downloads the target branch, scans the configured script path, and saves the current SQL as the baseline for subsequent changes.

Notification configuration​

When creating a flow, use Notification Configuration in the second step to select a channel, a configured messaging service, and the messages to subscribe to.

To update notifications later, open Configuration Items > IM message, click View Configuration, and save your changes.

Enable or disable a flow​

Use the change flow list to enable or disable a flow.

  • Disabling a flow stops it from responding to new automatic triggers.
  • When you create or re-enable a flow, CloudDM checks whether an enabled flow already uses the same source repository and target database combination.

Archive or delete a flow​

  • Archive stops the flow from processing new changes. Use Restore to resume managing an archived flow.
  • Delete permanently removes an archived flow and its history. Archive a flow before deleting it.

Integration settings​

  • In Configuration Items > Trigger Settings, choose View Configuration to set up webhooks or remote triggers. See GitLab configuration or Gitee configuration.
  • In Configuration Items > Callback Settings, choose View Configuration to configure a callback that notifies the external CI/CD system when the database change finishes.