flow

flow lets you run a series of commands contained in one or more stages, as configured in a Liquibase flow file. This command is available in Liquibase 4.15.0 and later.

Uses

Liquibase flow files let you create portable, platform-independent Liquibase workflows that can run anywhere without modification. This includes Jenkins, GitHub actions, a developers desktop, or any other CI/CD support tool.

You can use the flow command to run your flow file and execute many other commands all in one place. For more information, see Liquibase Flow Files.

Syntax

To run the flow command, specify the driver, classpath, and URL in Liquibase properties file. For more information, see Create and Configure a liquibase.properties File. You can also specify these properties in your command line.

Then run the flow command:

liquibase flow

Parameters

Global parameters

Attribute Definition Requirement

--license-key=<string>

Your Liquibase Pro license key

Required

Command parameters

Attribute Definition Requirement

--flow-file=<string>

The path to the configuration YAML file which contains one or more "stages" of commands to be executed in a liquibase flow operation. Default: liquibase.flowfile.yaml.

Optional

--flow-file-strict-parsing=<true|false>

If true, parse flow file YAML to allow only Liquibase flow file-specific properties, indentations, and structures. Default: true.

Optional

--flow-shell-interpreter=<string>

The default interpreter used to execute shell commands. Examples include bash, sh, and cmd.

Optional

--flow-shell-keep-temp-files=<true|false>

If true, do not delete temporary files created by the shell command execution. Default: false.

Optional

Global parameters

Attribute Definition Requirement

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

Your Liquibase Pro license key

Required

Command parameters

Attribute Definition Requirement

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

The path to the configuration YAML file which contains one or more "stages" of commands to be executed in a liquibase flow operation. Default: liquibase.flowfile.yaml.

Optional

cmdArgs: { flow-file-strict-parsing: "<true|false>" }

If true, parse flow file YAML to allow only Liquibase flow file-specific properties, indentations, and structures. Default: true.

Optional

cmdArgs: { flow-shell-interpreter: "<string>" }

The default interpreter used to execute shell commands. Examples include bash, sh, and cmd.

Optional

cmdArgs: { flow-shell-keep-temp-files: "<true|false>" }

If true, do not delete temporary files created by the shell command execution. Default: false.

Optional

Global parameters

Attribute Definition Requirement

liquibase.command.licenseKey: <string>

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

Your Liquibase Pro license key

Required

Command parameters

Attribute Definition Requirement

liquibase.command.flowFile: <string>

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

The path to the configuration YAML file which contains one or more "stages" of commands to be executed in a liquibase flow operation. Default: liquibase.flowfile.yaml.

Optional

liquibase.command.flowFileStrictParsing: <true|false>

liquibase.command.<cmdName>.flowFileStrictParsing: <true|false>

If true, parse flow file YAML to allow only Liquibase flow file-specific properties, indentations, and structures. Default: true.

Optional

liquibase.command.flowShellInterpreter: <string>

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

The default interpreter used to execute shell commands. Examples include bash, sh, and cmd.

Optional

liquibase.command.flowShellKeepTempFiles: <true|false>

liquibase.command.<cmdName>.flowShellKeepTempFiles: <true|false>

If true, do not delete temporary files created by the shell command execution. Default: false.

Optional

Global parameters

Attribute Definition Requirement

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

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

Your Liquibase Pro license key

Required

Command parameters

Attribute Definition Requirement

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

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

The path to the configuration YAML file which contains one or more "stages" of commands to be executed in a liquibase flow operation. Default: liquibase.flowfile.yaml.

Optional

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

JAVA_OPTS=-Dliquibase.command.<cmdName>.flowFileStrictParsing=<true|false>

If true, parse flow file YAML to allow only Liquibase flow file-specific properties, indentations, and structures. Default: true.

Optional

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

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

The default interpreter used to execute shell commands. Examples include bash, sh, and cmd.

Optional

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

JAVA_OPTS=-Dliquibase.command.<cmdName>.flowShellKeepTempFiles=<true|false>

If true, do not delete temporary files created by the shell command execution. Default: false.

Optional

Global parameters

Attribute Definition Requirement

LIQUIBASE_COMMAND_LICENSE_KEY=<string>

LIQUIBASE_COMMAND_<CMDNAME>_LICENSE_KEY=<string>

Your Liquibase Pro license key

Required

Command parameters

Attribute Definition Requirement

LIQUIBASE_COMMAND_FLOW_FILE=<string>

LIQUIBASE_COMMAND_<CMDNAME>_FLOW_FILE=<string>

The path to the configuration YAML file which contains one or more "stages" of commands to be executed in a liquibase flow operation. Default: liquibase.flowfile.yaml.

Optional

LIQUIBASE_COMMAND_FLOW_FILE_STRICT_PARSING=<true|false>

LIQUIBASE_COMMAND_<CMDNAME>_FLOW_FILE_STRICT_PARSING=<true|false>

If true, parse flow file YAML to allow only Liquibase flow file-specific properties, indentations, and structures. Default: true.

Optional

LIQUIBASE_COMMAND_FLOW_SHELL_INTERPRETER=<string>

LIQUIBASE_COMMAND_<CMDNAME>_FLOW_SHELL_INTERPRETER=<string>

The default interpreter used to execute shell commands. Examples include bash, sh, and cmd.

Optional

LIQUIBASE_COMMAND_FLOW_SHELL_KEEP_TEMP_FILES=<true|false>

LIQUIBASE_COMMAND_<CMDNAME>_FLOW_SHELL_KEEP_TEMP_FILES=<true|false>

If true, do not delete temporary files created by the shell command execution. Default: false.

Optional

Output

In this example, we are running the default flow file that comes pre-installed with Liquibase.

Related videos

Learn more about Flow in Liquibase Pro

Learn how to use Flow files with S3

Related links