bulk-set

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

The bulk-set subcommand sets all qualifying Policy checks to the same value. It helps you perform bulk management operations without running similar checks commands multiple times.

Uses

The bulk-set command allows you to modify all qualifying Policy checks at once using the --enable, --disable, and --severity flags.

Example Scenario

For example, in a few commands, you can disable all your Policy checks, set all severity exit codes to 0, and then pick a couple of them to enable and set the appropriate severity level. Let’s say you have 30 Policy checks with different priorities. However, you want to reset them all to have a severity of 0 and configure only a few to have a severity of 4, which you have set in your CI/CD tool as an exit code that stops your jobs. In this instance, you would run liquibase checks bulk-set --severity=0. to set them all to 0, then you would update the couple you want to severity 4 for with liquibase checks customize --checkname=<someCheckShortName1> and liquibase checks customize --checkname=<someCheckShortName2>.

Note: You cannot enable the checks that do not have the default value. You need to copy and customize them first.

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

Syntax

You can run the bulk-set command as follows:

liquibase checks bulk-set --disable
liquibase checks bulk-set --enable
liquibase checks bulk-set --severity=[INFO|MINOR|MAJOR|CRITICAL|BLOCKER]
liquibase checks bulk-set --severity=[0|1|2|3|4]

Note: If you have a checks settings file customized for a specific environment or project, you need to pass that using the --checks-settings-file parameter. If you do not include this parameter, Liquibase uses the default settings file: liquibase.checks-settings.conf. See Use the Checks Settings Configuration File.

The command is interactive, so to skip the confirmation in automation, use the --force flag with another bulk-set flag.

liquibase checks bulk-set --severity=INFO --force

You can pass only one flag at a time. For example, to enable checks and set them to severity=MINOR, run two bulk-set commands, as follows.

Example: liquibase checks bulk-set --enable
liquibase checks bulk-set --severity=MINOR

Parameters

Global parameters

Parameter Definition Requirement

--license-key=<string>

Your Liquibase Pro license key

Required

Command parameters

Parameter Description Requirement

--disable=<true|false>

Disable all qualifying checks in the checks settings file. Default: true.

Required (either this or --enable must be true)

--enable=<true|false>

Enable all qualifying checks in the checks settings file. Default: false.

Required (either this or --disable must be true)

--auto-enable-new-checks=<true|false>

Automatically enable new policy checks in liquibase.checks.conf file when they are available. Default: false.

Optional

--auto-update=<string>

Allows automatic backup and updating of the liquibase.checks-settings.conf file when new policy checks are available. Valid values are ON and OFF. Default: OFF.

Optional

--check-name=<string>

The name of the check(s) you want to target. Comma-separated list of one or more enabled checks. Checks to exclude can be prefixed with the ! character. If no checks are specified, all enabled checks are targeted. For example: --check-name=shortname1,shortname2,!shortname3

Optional

--checks-settings-file=<string>

Specifies the checks settings file to use with commands. Write the relative path of the settings file that you want to read from or modify. For more information, see Use the Checks Settings Configuration File.

Optional

--force=<true|false>

If true, Liquibase does not ask for confirmation when you run this command. Default: false.

Optional

--severity=<string>

Set the severity to return a code of 0–4 when the check is triggered. Default: 0.

Optional

Global parameters

Parameter Definition Requirement

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

Your Liquibase Pro license key

Required

Command parameters

Parameter Description Requirement

cmdArgs: { disable: "<true|false>" }

Disable all qualifying checks in the checks settings file. Default: true.

Required (either this or --enable must be true)

cmdArgs: { enable: "<true|false>" }

Enable all qualifying checks in the checks settings file. Default: false.

Required (either this or --disable must be true)

cmdArgs: { auto-enable-new-checks: "<true|false>" }

Automatically enable new policy checks in liquibase.checks.conf file when they are available. Default: false.

Optional

cmdArgs: { auto-update: "<string>" }

Allows automatic backup and updating of the liquibase.checks-settings.conf file when new policy checks are available. Valid values are ON and OFF. Default: OFF.

Optional

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

The name of the check(s) you want to target. Comma-separated list of one or more enabled checks. Checks to exclude can be prefixed with the ! character. If no checks are specified, all enabled checks are targeted. For example: --check-name=shortname1,shortname2,!shortname3

Optional

cmdArgs: { checks-settings-file: "<string>" }

Specifies the checks settings file to use with commands. Write the relative path of the settings file that you want to read from or modify. For more information, see Use the Checks Settings Configuration File.

Optional

cmdArgs: { force: "<true|false>" }

If true, Liquibase does not ask for confirmation when you run this command. Default: false.

Optional

cmdArgs: { severity: "<string>" }

Set the severity to return a code of 0–4 when the check is triggered. Default: 0.

Optional

Global parameters

Parameter Definition Requirement

liquibase.licenseKey: <string>

Your Liquibase Pro license key

Required

Command parameters

Parameter Description Requirement

liquibase.command.disable: <true|false>

liquibase.command.checks.bulkSet.disable: <true|false>

Disable all qualifying checks in the checks settings file. Default: true.

Required (either this or --enable must be true)

liquibase.command.enable: <true|false>

liquibase.command.checks.bulkSet.enable: <true|false>

Enable all qualifying checks in the checks settings file. Default: false.

Required (either this or --disable must be true)

liquibase.command.autoEnableNewChecks: <true|false>

liquibase.command.checks.bulkSet.autoEnableNewChecks: <true|false>

Automatically enable new policy checks in liquibase.checks.conf file when they are available. Default: false.

Optional

liquibase.command.autoUpdate: <string>

liquibase.command.checks.bulkSet.autoUpdate: <string>

Allows automatic backup and updating of the liquibase.checks-settings.conf file when new policy checks are available. Valid values are ON and OFF. Default: OFF.

Optional

liquibase.command.checkName: <string>

liquibase.command.checks.bulkSet.checkName: <string>

The name of the check(s) you want to target. Comma-separated list of one or more enabled checks. Checks to exclude can be prefixed with the ! character. If no checks are specified, all enabled checks are targeted. For example: --check-name=shortname1,shortname2,!shortname3

Optional

liquibase.command.checksSettingsFile: <string>

liquibase.command.checks.bulkSet.checksSettingsFile: <string>

Specifies the checks settings file to use with commands. Write the relative path of the settings file that you want to read from or modify. For more information, see Use the Checks Settings Configuration File.

Optional

liquibase.command.force: <true|false>

liquibase.command.checks.bulkSet.force: <true|false>

If true, Liquibase does not ask for confirmation when you run this command. Default: false.

Optional

liquibase.command.severity: <string>

liquibase.command.checks.bulkSet.severity: <string>

Set the severity to return a code of 0–4 when the check is triggered. Default: 0.

Optional

Global parameters

Parameter Definition Requirement

JAVA_OPTS=-Dliquibase.licenseKey=<string>

Your Liquibase Pro license key

Required

Command parameters

Parameter Description Requirement

JAVA_OPTS=-Dliquibase.command.disable=<true|false>

JAVA_OPTS=-Dliquibase.command.checks.bulkSet.disable=<true|false>

Disable all qualifying checks in the checks settings file. Default: true.

Required (either this or --enable must be true)

JAVA_OPTS=-Dliquibase.command.enable=<true|false>

JAVA_OPTS=-Dliquibase.command.checks.bulkSet.enable=<true|false>

Enable all qualifying checks in the checks settings file. Default: false.

Required (either this or --disable must be true)

JAVA_OPTS=-Dliquibase.command.autoEnableNewChecks=<true|false>

JAVA_OPTS=-Dliquibase.command.checks.bulkSet.autoEnableNewChecks=<true|false>

Automatically enable new policy checks in liquibase.checks.conf file when they are available. Default: false.

Optional

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

JAVA_OPTS=-Dliquibase.command.checks.bulkSet.autoUpdate=<string>

Allows automatic backup and updating of the liquibase.checks-settings.conf file when new policy checks are available. Valid values are ON and OFF. Default: OFF.

Optional

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

JAVA_OPTS=-Dliquibase.command.checks.bulkSet.checkName=<string>

The name of the check(s) you want to target. Comma-separated list of one or more enabled checks. Checks to exclude can be prefixed with the ! character. If no checks are specified, all enabled checks are targeted. For example: --check-name=shortname1,shortname2,!shortname3

Optional

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

JAVA_OPTS=-Dliquibase.command.checks.bulkSet.checksSettingsFile=<string>

Specifies the checks settings file to use with commands. Write the relative path of the settings file that you want to read from or modify. For more information, see Use the Checks Settings Configuration File.

Optional

JAVA_OPTS=-Dliquibase.command.force=<true|false>

JAVA_OPTS=-Dliquibase.command.checks.bulkSet.force=<true|false>

If true, Liquibase does not ask for confirmation when you run this command. Default: false.

Optional

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

JAVA_OPTS=-Dliquibase.command.checks.bulkSet.severity=<string>

Set the severity to return a code of 0–4 when the check is triggered. Default: 0.

Optional

Global parameters

Parameter Definition Requirement

LIQUIBASE_LICENSE_KEY=<string>

Your Liquibase Pro license key

Required

Command parameters

Parameter Description Requirement

LIQUIBASE_COMMAND_DISABLE=<true|false>

LIQUIBASE_COMMAND_CHECKS_BULK_SET_DISABLE=<true|false>

Disable all qualifying checks in the checks settings file. Default: true.

Required (either this or --enable must be true)

LIQUIBASE_COMMAND_ENABLE=<true|false>

LIQUIBASE_COMMAND_CHECKS_BULK_SET_ENABLE=<true|false>

Enable all qualifying checks in the checks settings file. Default: false.

Required (either this or --disable must be true)

LIQUIBASE_COMMAND_AUTO_ENABLE_NEW_CHECKS=<true|false>

LIQUIBASE_COMMAND_CHECKS_BULK_SET_AUTO_ENABLE_NEW_CHECKS=<true|false>

Automatically enable new policy checks in liquibase.checks.conf file when they are available. Default: false.

Optional

LIQUIBASE_COMMAND_AUTO_UPDATE=<string>

LIQUIBASE_COMMAND_CHECKS_BULK_SET_AUTO_UPDATE=<string>

Allows automatic backup and updating of the liquibase.checks-settings.conf file when new policy checks are available. Valid values are ON and OFF. Default: OFF.

Optional

LIQUIBASE_COMMAND_CHECK_NAME=<string>

LIQUIBASE_COMMAND_CHECKS_BULK_SET_CHECK_NAME=<string>

The name of the check(s) you want to target. Comma-separated list of one or more enabled checks. Checks to exclude can be prefixed with the ! character. If no checks are specified, all enabled checks are targeted. For example: --check-name=shortname1,shortname2,!shortname3

Optional

LIQUIBASE_COMMAND_CHECKS_SETTINGS_FILE=<string>

LIQUIBASE_COMMAND_CHECKS_BULK_SET_CHECKS_SETTINGS_FILE=<string>

Specifies the checks settings file to use with commands. Write the relative path of the settings file that you want to read from or modify. For more information, see Use the Checks Settings Configuration File.

Optional

LIQUIBASE_COMMAND_FORCE=<true|false>

LIQUIBASE_COMMAND_CHECKS_BULK_SET_FORCE=<true|false>

If true, Liquibase does not ask for confirmation when you run this command. Default: false.

Optional

LIQUIBASE_COMMAND_SEVERITY=<string>

LIQUIBASE_COMMAND_CHECKS_BULK_SET_SEVERITY=<string>

Set the severity to return a code of 0–4 when the check is triggered. Default: 0.

Optional

Related links