Skip to content

Commit

Permalink
PD-5260
Browse files Browse the repository at this point in the history
  • Loading branch information
AMBERMW13 committed Jan 8, 2025
1 parent 5257630 commit 4fef059
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Content/liquibase-pro/flow/variables.htm
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ <h3>Default values</h3>
cmdArgs: {changelog-file: "${CHANGELOG_FILE}"}</code></pre>
<p>In the preceding example, <MadCap:variable name="General.Liquibase" /> checks whether the value of the global variable <code class="language-text">UPDATE</code> is not null before executing the rest of the action.</p>
<p class="note" MadCap:autonum="&lt;b&gt;Note: &lt;/b&gt;">If you define a default value for a variable, <b>the default is inherited by any nested flow files</b> that call on the parent flow file. The default value also applies to the nested flow files.</p>
<h3 MadCap:conditions="exclude.future">Default values:&#160;nested property substitution</h3>
<p MadCap:conditions="exclude.future">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.</p>
<h4 MadCap:conditions="exclude.future">Example:</h4>
<ol MadCap:conditions="exclude.future">
<h3>Default values:&#160;nested property substitution</h3>
<p>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.</p>
<h4>Example:</h4>
<ol>
<li>Set a global variable with a default value inside the flow file:<pre xml:space="preserve"><code class="language-yaml">globalVariables:
SCHEMA: "${SCHEMA:-public}"</code></pre></li>
<li>Pass that same variable into another global (or stage) variable:<pre xml:space="preserve"><code class="language-yaml">globalVariables:
Expand All @@ -126,7 +126,7 @@ <h4 MadCap:conditions="exclude.future">Example:</h4>
cmdArgs: {changelog-file: "changelogs/changelog.sql", url: "${DB_URL}"}
</code></pre></li>
</ol>
<p MadCap:conditions="exclude.future">In this example, the variables expand as follows:</p><pre xml:space="preserve" MadCap:conditions="exclude.future"><code class="language-yaml">${dbUrl} → jdbc:h2:file:./target/${SCHEMA} → jdbc:h2:file:./target/public</code></pre>
<p>In this example, the variables expand as follows:</p><pre xml:space="preserve"><code class="language-yaml">${dbUrl} → jdbc:h2:file:./target/${SCHEMA} → jdbc:h2:file:./target/public</code></pre>
<h3>Environment variables</h3>
<p>You can substitute the values of <a href="../../concepts/connections/liquibase-environment-variables.htm">environment variables</a> in your flow file. The syntax is the same as substituting other variables. For example:</p><pre xml:space="preserve"><code class="language-yaml">stages:
systemEnvars:
Expand Down

0 comments on commit 4fef059

Please sign in to comment.