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
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.
Configure your snapshot job to run at your desired frequency, such as once per release.
Repeat Steps 1–2 for every database whose state you want to track with Liquibase drift reports.
Create a LiquibaseDriftReport job that compares the snapshot to the current database state or another snapshot.
This job must:
Enable the drift report with
--reports-enabled
(global scope) or--report-enabled
(command scope).Run the Liquibase
diff
ordiff-changelog
command against your desired databases.(Optional) Specify the
--drift-severity-*
parameters to control whether Liquibase should respond differently to changed, missing, or unexpected content.