Execue liquibase validate without specify db connection

Hi,

As part of my CI pipeline, I would like to perform only validation (lint) tests without needing a database connection string.
Note: during my CI pipeline I don’t have access to my DB.

The goal is to ensure my changelog.xml is valid and that all files specified within it exist in the filesystem (maybe more validation tests?).
This means the --url= flag should be optional, and the logic should simply verify the changelog’s validity and file existence.

Any plans to support that?

links:

Welcome to the forums @devopsmash!

We require a database url so we can validate that previously executed changesets have not been altered since they were executed. When a changeset is executed we generate a checksum for it and store that checksum in the DATABASECHANGELOG table of your database so we can detect those changes. Checksum mismatches will prevent you from being able to run an update or rollback, so it’s an important part of the validate process.

We don’t currently have plans to remove that requirement from the validate command. Feel free to file an issue in the liquibase/liquibase repo for this enhancement request and the team will take a look at it. In the meantime, you could spin up a containerized empty database during your CI job to satisfy the requirement if you’re allowed.