Use drift reports in your CI/CD pipeline

Last updated: July 14, 2025

To automatically use Liquibase drift reports in your CI/CD pipeline, you'll follow these steps in your CI/CD tool.

Tip: For more information, see What is the Drift Report?

Procedure

1

Create a LiquibaseDatabaseSnapshot job that runs the Liquibase snapshot command.

This stores the current state of your database. It is a best practice to store your database snapshot in an artifact repository like Artifactory, Sonatype Nexus Repository, Amazon S3, Azure Blob Storage, or a database-specific artifact repository.

2

Configure your snapshot job to run at your desired frequency, such as once per release.

3

Repeat Steps 1–2 for every database whose state you want to track with Liquibase drift reports.

4

Create a LiquibaseDriftReport job that compares the snapshot to the current database state or another snapshot.

This job must:

  1. Enable the drift report with --reports-enabled (global scope) or --report-enabled (command scope).

  2. Run the Liquibase diff or diff-changelog command against your desired databases.

  3. (Optional) Specify the --drift-severity-* parameters to control whether Liquibase should respond differently to changed, missing, or unexpected content.

5

Configure your drift report job to run at your desired frequency, such as once per day.