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 quality 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 quality checks at once using the --enable, --disable, and --severity flags.

Example Scenario

For example, in a few commands, you can disable all your quality 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 quality 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.

Command Args with bulk-set

The following table identifies parameters that are accepted or required by the bulk-set subcommand. The Required column tells you if a command arg is required by the command. For bulk-set, the only required command is enable or disable. bulk-set must be one or the other. Each command arg helps you narrow down the liquibase checks bulk-set command to ensure that only very specific content is affected by the command.

Tip: For best results, specify all commands and parameters in the --kebab-case format in the CLI. If your preference is camelCase, it also works in the CLI.

Command Arg Required Syntax Description
autoUpdate (String) null

CLI: --auto-update=[on|off]

Property: liquibase.command.checks.bulk-set.autoUpdate: [on|off]

Environment Variable: LIQUIBASE_COMMAND_CHECKS_BULK_SET_AUTO_UPDATE=[ON|OFF]

Allows automatic backup and updating of liquibase.checks.conf file when new quality checks are available. Options: [on|off]
checksSettingsFile (String) null

CLI: --checks-settings-file

Property: liquibase.command.checks.bulk-set.checksSettingsFile

Environment Variable: LIQUIBASE_COMMAND_CHECKS_BULK_SET_CHECKS_SETTINGS_FILE

Relative or fully qualified path to a configuration file for checks execution
disable (Boolean)

Required

Set to either enable or disable

CLI: --disable=[true|false]

Property: liquibase.command.checks.bulk-set.disable: [true|false]

Environment Variable: LIQUIBASE_COMMAND_CHECKS_BULK_SET_DISABLE=[TRUE|FALSE]

Disable all qualifying checks in the checks settings file.

This is the default setting. Users must set to enable to activate bulk-set.
enable (Boolean)

Required

Set to either enable or disable

CLI: --enable=[true|false]

Property: liquibase.command.checks.bulk-set.enable: [true|false]

Environment Variable: LIQUIBASE_COMMAND_CHECKS_BULK_SET_ENABLE=[TRUE|FALSE]

Enable all qualifying checks in the checks settings file
force (Boolean) null

CLI: --force=[true|false]

Property: liquibase.command.checks.bulk-set.force: [true|false]

Environment Variable: LIQUIBASE_COMMAND_CHECKS_BULK_SET_FORCE=[TRUE| FALSE]

Do not ask for confirmation when running this command
severity (String) null

CLI: --severity

Property: liquibase.command.checks.bulk-set.severity

Environment Variable: LIQUIBASE_COMMAND_CHECKS_BULK_SET_SEVERITY

Set the severity of all checks to the value specified

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

Tip: Specify the --auto-update parameter if you want to allow automatic backup and updating of the liquibase.checks-settings.conf file when new quality checks are available:
CLI: --auto-update=[on|off]
Property: liquibase.command.checks.bulkset.autoUpdate: [on|off]
Environment Variable: LIQUIBASE_COMMAND_CHECKS_BULKSET_AUTO_UPDATE=[ON|OFF]

Related links