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: Policy 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 Policy 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
- Create a checks settings file. You need at least one to include in a checks package file. Run any Policy check command:
- 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:
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!
liquibase checks create \
--package-file=my-package-file.yaml \
--package-name=my-first-package \
--package-contents=liquibase.checks-settings.conf
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 Policy Checks Packages.
Parameters
Global parameters
Attribute | Definition | Requirement |
---|---|---|
|
Your Liquibase Pro license key |
Required |
Command parameters
Attribute | Description | Requirement |
---|---|---|
|
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 |
Required |
|
The name of the checks package object to be created inside the checks package YAML file. |
Required |
|
The relative or fully qualified path and filename of the YAML file to create. Default: |
Optional |
Global parameters
Attribute | Definition | Requirement |
---|---|---|
|
Your Liquibase Pro license key |
Required |
Command parameters
Attribute | Description | Requirement |
---|---|---|
|
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 |
Required |
|
The name of the checks package object to be created inside the checks package YAML file. |
Required |
|
The relative or fully qualified path and filename of the YAML file to create. Default: |
Optional |
Global parameters
Attribute | Definition | Requirement |
---|---|---|
|
Your Liquibase Pro license key |
Required |
Command parameters
Attribute | Description | Requirement |
---|---|---|
|
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 |
Required |
|
The name of the checks package object to be created inside the checks package YAML file. |
Required |
|
The relative or fully qualified path and filename of the YAML file to create. Default: |
Optional |
Global parameters
Attribute | Definition | Requirement |
---|---|---|
|
Your Liquibase Pro license key |
Required |
Command parameters
Attribute | Description | Requirement |
---|---|---|
|
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 |
Required |
|
The name of the checks package object to be created inside the checks package YAML file. |
Required |
|
The relative or fully qualified path and filename of the YAML file to create. Default: |
Optional |
Global parameters
Attribute | Definition | Requirement |
---|---|---|
|
Your Liquibase Pro license key |
Required |
Command parameters
Attribute | Description | Requirement |
---|---|---|
|
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 |
Required |
|
The name of the checks package object to be created inside the checks package YAML file. |
Required |
|
The relative or fully qualified path and filename of the YAML file to create. Default: |
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.