diff --git a/Content/liquibase-pro/flow/variables.htm b/Content/liquibase-pro/flow/variables.htm index 8591d79c6..4e2584e2d 100644 --- a/Content/liquibase-pro/flow/variables.htm +++ b/Content/liquibase-pro/flow/variables.htm @@ -105,10 +105,10 @@

Default values

cmdArgs: {changelog-file: "${CHANGELOG_FILE}"}

In the preceding example, checks whether the value of the global variable UPDATE is not null before executing the rest of the action.

If you define a default value for a variable, the default is inherited by any nested flow files that call on the parent flow file. The default value also applies to the nested flow files.

-

Default values: nested property substitution

-

You can nest variables within each other, which allows you to specify dynamic variable names at runtime. This allows flexibility within flow files to set and pass global variables as part of another variable.

-

Example:

-
    +

    Default values: nested property substitution

    +

    You can nest variables within each other, which allows you to specify dynamic variable names at runtime. This allows flexibility within flow files to set and pass global variables as part of another variable.

    +

    Example:

    +
    1. Set a global variable with a default value inside the flow file:
      globalVariables:
         SCHEMA: "${SCHEMA:-public}"
    2. Pass that same variable into another global (or stage) variable:
      globalVariables:
      @@ -126,7 +126,7 @@ 

      Example:

      cmdArgs: {changelog-file: "changelogs/changelog.sql", url: "${DB_URL}"}
    -

    In this example, the variables expand as follows:

    ${dbUrl} → jdbc:h2:file:./target/${SCHEMA} → jdbc:h2:file:./target/public
    +

    In this example, the variables expand as follows:

    ${dbUrl} → jdbc:h2:file:./target/${SCHEMA} → jdbc:h2:file:./target/public

    Environment variables

    You can substitute the values of environment variables in your flow file. The syntax is the same as substituting other variables. For example:

    stages:
       systemEnvars: