Skip to content

Commit

Permalink
PD-3637
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-velonis1 committed Aug 10, 2023
1 parent 5ade181 commit e9ba3c7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<body>
<MadCap:snippetBlock src="../note/command-pro.flsnp" />
<p>The <code MadCap:conditions="command-set-contexts-set-labels.contexts">set-contexts</code><code MadCap:conditions="command-set-contexts-set-labels.labels">set-labels</code> command set or replace <MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.contexts"><a href="../../../concepts/changelogs/attributes/contexts.html">contexts</a></MadCap:conditionalText><MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.labels"><a href="../../../concepts/changelogs/attributes/labels.html">labels</a></MadCap:conditionalText> on your <MadCap:variable name="General.changeset" />s <b>using your command line</b>. This is an alternative to setting <MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.contexts">contexts</MadCap:conditionalText><MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.labels">labels</MadCap:conditionalText>&#160;<b>directly in your <MadCap:variable name="General.changelog" /></b>. You can use these <MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.contexts">contexts</MadCap:conditionalText><MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.labels">labels</MadCap:conditionalText> to specify which <MadCap:variable name="General.changeset" />s to deploy in a later update.</p>
<p>The command works with any valid <MadCap:variable name="General.changelog" />. You can choose which <MadCap:variable name="General.changeset" />s to target by specifying a changeset author, ID, path, or an existing context or label filter. It is available in <MadCap:variable name="General.Liquibase" /> 4.23.1+.</p>
<p>The command works with any valid <MadCap:variable name="General.changelog" />. You can choose which <MadCap:variable name="General.changeset" />s to target by specifying a <MadCap:variable name="General.changeset" /> author, ID, path, or an existing context or label filter. It is available in <MadCap:variable name="General.Liquibase" /> 4.23.1+.</p>
<h2>Uses</h2>
<p>If you need to apply <MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.contexts">contexts</MadCap:conditionalText><MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.labels">labels</MadCap:conditionalText> to many <MadCap:variable name="General.changeset" />s, manually inserting them into your <MadCap:variable name="General.changelog" /> is slow and can lead to errors. Instead, <b>use <code MadCap:conditions="command-set-contexts-set-labels.contexts">set-contexts</code><code MadCap:conditions="command-set-contexts-set-labels.labels">set-labels</code> to quickly add contexts in bulk</b>.</p>
<p>If you need to apply <MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.contexts">contexts</MadCap:conditionalText><MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.labels">labels</MadCap:conditionalText> to many <MadCap:variable name="General.changeset" />s, manually inserting them into your <MadCap:variable name="General.changelog" /> is slow and can lead to errors. Instead, <b>use <code MadCap:conditions="command-set-contexts-set-labels.contexts">set-contexts</code><code MadCap:conditions="command-set-contexts-set-labels.labels">set-labels</code> to quickly add or replace <MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.contexts">contexts</MadCap:conditionalText><MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.labels">labels</MadCap:conditionalText> in bulk</b>.</p>
<p>By default, <MadCap:variable name="General.Liquibase" /> appends any <MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.contexts">contexts</MadCap:conditionalText><MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.labels">labels</MadCap:conditionalText> you specify with <code MadCap:conditions="command-set-contexts-set-labels.contexts">set-contexts</code><code MadCap:conditions="command-set-contexts-set-labels.labels">set-labels</code> to the list of <MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.contexts">contexts</MadCap:conditionalText><MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.labels">labels</MadCap:conditionalText> already on your <MadCap:variable name="General.changeset" />s. However, if you set <code>--force-replace</code> to <code>true</code>, <MadCap:variable name="General.Liquibase" /> drops existing <MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.contexts">contexts</MadCap:conditionalText><MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.labels">labels</MadCap:conditionalText> before adding the new ones.</p>
<p>The command is also useful if you want to standardize multiple similar <MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.contexts">contexts</MadCap:conditionalText><MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.labels">labels</MadCap:conditionalText> or replace deprecated ones. You can specify command arguments to control the formatting <MadCap:variable name="General.Liquibase" /> uses when it inserts the <MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.contexts">contexts</MadCap:conditionalText><MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.labels">labels</MadCap:conditionalText> into your <MadCap:variable name="General.changelog" />.</p>
<p>After setting your <MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.contexts">contexts</MadCap:conditionalText><MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.labels">labels</MadCap:conditionalText> with <code MadCap:conditions="command-set-contexts-set-labels.contexts">set-contexts</code><code MadCap:conditions="command-set-contexts-set-labels.labels">set-labels</code>, you can deploy your changes with the <code><MadCap:xref href="../../../commands/update/update.html">update</MadCap:xref></code> command. While deploying, specify the <code MadCap:conditions="command-set-contexts-set-labels.contexts">--<a href="../../../concepts/changelogs/attributes/contexts.html">context-filter</a></code><code MadCap:conditions="command-set-contexts-set-labels.labels">--<a href="../../../concepts/changelogs/attributes/labels.html">labels</a></code> command argument to control which <MadCap:variable name="General.changeset" />s are run.</p>
<p>By default, <MadCap:variable name="General.Liquibase" /> appends any <MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.contexts">contexts</MadCap:conditionalText><MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.labels">labels</MadCap:conditionalText> you specify with <code MadCap:conditions="command-set-contexts-set-labels.contexts">set-contexts</code><code MadCap:conditions="command-set-contexts-set-labels.labels">set-labels</code> to the list of <MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.contexts">contexts</MadCap:conditionalText><MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.labels">labels</MadCap:conditionalText> already on your <MadCap:variable name="General.changeset" />s. However, if you set <code>--force-replace</code> to <code>true</code>, <MadCap:variable name="General.Liquibase" /> drops existing <MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.contexts">contexts</MadCap:conditionalText><MadCap:conditionalText MadCap:conditions="command-set-contexts-set-labels.labels">labels</MadCap:conditionalText> before adding the new ones.</p>
<h2>Syntax</h2>
<p>To run the <code MadCap:conditions="command-set-contexts-set-labels.contexts">set-contexts</code><code MadCap:conditions="command-set-contexts-set-labels.labels">set-labels</code> command, specify the driver, classpath, and URL in <MadCap:variable name="General.Liquibase" /> properties file. For more information, see <MadCap:xref href="../../../concepts/connections/creating-config-properties.html">Create and Configure a [%=General.liquiPropFile%] File</MadCap:xref>. You can also specify these properties in your command line.</p>
<p>Then run the <code MadCap:conditions="command-set-contexts-set-labels.contexts">set-contexts</code><code MadCap:conditions="command-set-contexts-set-labels.labels">set-labels</code> command:</p><pre MadCap:conditions="command-set-contexts-set-labels.contexts"><code class="language-text">liquibase set-contexts --changelog-file=example-changelog.xml --set-as=dev,test</code></pre><pre MadCap:conditions="command-set-contexts-set-labels.labels"><code class="language-text">liquibase set-labels --changelog-file=example-changelog.xml --set-as=dev,test</code></pre>
Expand All @@ -27,7 +27,7 @@
</thead>
<tbody>
<tr>
<td><code>--licensey-key</code>
<td><code>--license-key</code>
</td>
<td>
<MadCap:snippetBlock src="../def/attributes/cli/cli-global-license-key.flsnp" />
Expand Down

0 comments on commit e9ba3c7

Please sign in to comment.