create

Note: This is a Liquibase Pro feature, so you need a Liquibase Pro License Key to use it.

The create subcommand allows you to create a new YAML checks package file. Learn more about Checks packages here: Quality Checks Packages. It is available in Liquibase 4.25.0 and later.

Uses

Using the create subcommand alongside the checks command creates a new YAML checks package file. This checks package file contains several package objects, which in turn contain checks settings files which enable or disable any quality check you want. This lets you run a bundle of checks at once rather than one at a time.

Note: To view a list of available checks, run liquibase checks show.

Syntax

  1. Create a checks settings file. You need at least one to include in a checks package file. Run any quality check command:
  2. liquibase checks show

    Select 1 to use the default checks settings file (liquibase.checks-settings.conf). When successful, Liquibase displays the following message along with the output of the command you ran:

    liquibase.checks-settings.conf successfully created!
  3. Run the checks create command to create a new YAML checks package file. If you specify a file that does not exist, Liquibase will create it. For example:
  4. liquibase checks create \
      --package-file=my-package-file.yaml \
      --package-name=my-first-package \
      --package-contents=liquibase.checks-settings.conf

    This results in a package file called my-package-file.yaml. The file contains one package object (my-first-package), which contains the one checks settings file you created:

    checksPackages:
      - name: platform-checks
        files:
          - liquibase.checks-settings.conf

For more information and examples about creating custom package files, see Quality Checks Packages.

Parameters

Global parameters

Attribute Definition Requirement

--license-key=<string>

Your Liquibase Pro license key

Required

Command parameters

Attribute Description Requirement

--package-contents=<string>

One or more comma-separated relative path(s) to the checks settings files (or to a directory of files) to be bundled into the checks package. If the value is a directory, all files will be added to the --package-name object, but not recursively.

Required

--package-name=<string>

The name of the checks package object to be created inside the checks package YAML file.

Required

--package-file=<string>

The relative or fully qualified path and filename of the YAML file to create. Default: liquibase.checks-package.yaml.

Optional

Global parameters

Attribute Definition Requirement

globalArgs: { license-key: "<string>" }

Your Liquibase Pro license key

Required

Command parameters

Attribute Description Requirement

cmdArgs: { package-contents: "<string>" }

One or more comma-separated relative path(s) to the checks settings files (or to a directory of files) to be bundled into the checks package. If the value is a directory, all files will be added to the --package-name object, but not recursively.

Required

cmdArgs: { package-name: "<string>" }

The name of the checks package object to be created inside the checks package YAML file.

Required

cmdArgs: { package-file: "<string>" }

The relative or fully qualified path and filename of the YAML file to create. Default: liquibase.checks-package.yaml.

Optional

Global parameters

Attribute Definition Requirement

liquibase.licenseKey: <string>

Your Liquibase Pro license key

Required

Command parameters

Attribute Description Requirement

liquibase.command.packageContents: <string>

liquibase.command.<cmdName>.packageContents: <string>

One or more comma-separated relative path(s) to the checks settings files (or to a directory of files) to be bundled into the checks package. If the value is a directory, all files will be added to the --package-name object, but not recursively.

Required

liquibase.command.packageName: <string>

liquibase.command.<cmdName>.packageName: <string>

The name of the checks package object to be created inside the checks package YAML file.

Required

liquibase.command.packageFile: <string>

liquibase.command.<cmdName>.packageFile: <string>

The relative or fully qualified path and filename of the YAML file to create. Default: liquibase.checks-package.yaml.

Optional

Global parameters

Attribute Definition Requirement

JAVA_OPTS=-Dliquibase.licenseKey=<string>

Your Liquibase Pro license key

Required

Command parameters

Attribute Description Requirement

JAVA_OPTS=-Dliquibase.command.packageContents=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.packageContents=<string>

One or more comma-separated relative path(s) to the checks settings files (or to a directory of files) to be bundled into the checks package. If the value is a directory, all files will be added to the --package-name object, but not recursively.

Required

JAVA_OPTS=-Dliquibase.command.packageName=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.packageName=<string>

The name of the checks package object to be created inside the checks package YAML file.

Required

JAVA_OPTS=-Dliquibase.command.packageFile=<string>

JAVA_OPTS=-Dliquibase.command.<cmdName>.packageFile=<string>

The relative or fully qualified path and filename of the YAML file to create. Default: liquibase.checks-package.yaml.

Optional

Global parameters

Attribute Definition Requirement

LIQUIBASE_LICENSE_KEY=<string>

Your Liquibase Pro license key

Required

Command parameters

Attribute Description Requirement

LIQUIBASE_COMMAND_PACKAGE_CONTENTS=<string>

LIQUIBASE_COMMAND_<CMDNAME>_PACKAGE_CONTENTS=<string>

One or more comma-separated relative path(s) to the checks settings files (or to a directory of files) to be bundled into the checks package. If the value is a directory, all files will be added to the --package-name object, but not recursively.

Required

LIQUIBASE_COMMAND_PACKAGE_NAME=<string>

LIQUIBASE_COMMAND_<CMDNAME>_PACKAGE_NAME=<string>

The name of the checks package object to be created inside the checks package YAML file.

Required

LIQUIBASE_COMMAND_PACKAGE_FILE=<string>

LIQUIBASE_COMMAND_<CMDNAME>_PACKAGE_FILE=<string>

The relative or fully qualified path and filename of the YAML file to create. Default: liquibase.checks-package.yaml.

Optional

Output

INFO: SUCCESS! 'my-package-file.yaml' was created, and the specified file at 'liquibase.checks-settings.conf' were added to new checks package named 'my-first-package'. Use this checks package with 'liquibase checks show --checks-settings-file=my-package-file.yaml --checks-packages=my-first-package'
Liquibase command 'checks create' was executed successfully.

Related links