Liquibase Enterprise was formerly known as Datical DB.
Running Deployment Packager
Running Deployment Packager from the CLI
In the CLI, the Deployment Packager is initiated by running deployPackager.groovy
. The script has two main modes of action: packaging SQL scripts and parameters defined in a manifest file or packaging SQL scripts directly from an SCM repository.
The following sections show examples.
See also CLI - Deployment Packager
SCM Mode Examples
- Check the SCM repository for new files to process. The "preview" flag runs through processing without actually doing anything. It is useful when you're getting the SCM tool configured with Datical.
hammer groovy deployPackager.groovy pipeline=pipeline_name scm=true [labels=<comma separated list>] preview
- Check the SCM repository for new files, process them, and update the repository pointer (in the deployPackager.properties file) to mark the files as processed.
hammer groovy deployPackager.groovy pipeline=pipeline_name scm=true [labels=<comma separated list>]
h
ammer groovy
- Check the SCM repository for new files, process them, and update the repository pointer to mark the files as processed. The quiet option suppresses all informational messages.
hammer groovy deployPackager.groovy pipeline=pipeline_name scm=true [labels=<comma separated list>] quiet
- When employing FEATURE BASED MERGE MODE, run the script with a
dbdef=<dbdef_name>
parameter that targets a specific database definition within a project. For more information on this mode see SQL Code Branching & Merging (Advanced).
hammer groovy deployPackager.groovy dbdef=<dbdef_name> scm=true [labels=<comma separated list>]
- Example command that can be used at the command line or in a Jenkins job. Note that the value passed for
--projectKey
is actually the project name and not the project key from DMC.
hammer groovy deployPackager.groovy pipeline=pipeline_name scm=true --daticalServer=dmc_server_url --daticalUsername=user_name --projectKey=project_name
Manifest Mode Examples
- Process the SQL files listed in the manifest file. The "preview" flag runs through processing without actually processing SQL scripts. It is useful for validating the manifest file when getting your system configured.
hammer groovy deployPackager.groovy pipeline_name manifest=<file.json> [labels=<comma separated list>] preview
- Process the SQL files listed in the manifest file.
hammer groovy deployPackager.groovy pipeline_name manifest=<file.json> [labels=<comma separated list>]
- Process the SQL files listed in the manifest file. The quiet option suppresses all informational messages.
hammer groovy deployPackager.groovy_name manifest=<file.json> [labels=<comma separated list>] quiet
Running Deployment Packager from the Datical DB GUI
The Datical DB GUI provides a guided wizard that allows you to: execute the Deployment Packager in SCM Mode; define & edit manifests; and execute the Deployment Packager in Manifest Mode. Refer to the screenshots and descriptions below to familiarize yourself with the wizard.
Launching the Deployment Packager Wizard
To launch the Deployment Packager Wizard, select the Deployment Pipeline you wish to work in using the control highlighted in blue and click the 'Deployment Packager' button highlighted in red.
Deployment Packager Wizard Overview
Selecting Execution Mode and Runtime settings
The initial page of the wizard allows you to select your desired activity and set runtime parameters prior to executing the Deployment Packager. Areas to note:
- Onboarding Method – Select whether you'd like to operate in SCM mode, create a new manifest file or load an existing manifest file.
- Deployment Step Selector – When using a Feature Merge, you may select a specific database definition in the current pipeline against which to run the Deployment Packager. The default selection "Current Pipeline" will run against the reference database for this pipeline. The reference database is assumed to be the first database definition in the current pipeline.
- Runtime Parameters
- Labels & Contexts Assign any additional labels or contexts you'd like to associate with ALL change sets generated by this execution of the Deployment Packager. NOTE: This information isn't saved anywhere, so if the wizard is closed prior to execution these label and context values will need to be reconfigured.
- Preview Mode Checking this box prior to executing the Deployment Packager will confirm that the current configuration will lead to a successful packaging attempt. This is useful when you are first configuring a new Project to employ the Deployment Packager OR when you are authoring a new manifest file.
- Navigation Buttons
- < Back – Never enabled on this page.
- Next > - Enabled when either 'Create New Manifest' or 'Specify Existing Manifest File' is specified. This takes you to the Manifest File Editor portion of this wizard.
- Run – Enabled when 'Source Code Management Integration' or 'Specify an Existing Manifest File' is enabled. This will execute the Deployment Packager according to the current settings.
- Cancel – Closes the Deployment Packager wizard without doing anything.
Manifest File Overview Page
After selecting one of the Manifest File options on the first page of the wizard and clicking 'Next>' you are taken to the Manifest File Overview. This page allows you to:
- Add/Remove File Groups in the manifest.
- Launch the File Group Editor to define a File Group
- Control in what order File Groups are processed during Deployment Packager execution by selecting a File Group in the table able using the 'Move Up' and 'Move Down' buttons
- Save the manifest to the Resources directory of the project for later editing or execution
File group Editor dialog
Clicking the 'Add File Group' or 'View/Edit File Group' buttons on the Manifest File Overview page will launch the File Group Editor. In this dialog you will be able to:
- Specify the file name, rollback file name, file type, author and comments for one or more SQL scripts to be packaged.
- Remove previously defined files from the File Group
- Control the order in which those scripts are executed within that File Group
- Specify Labels and Contexts to be applied to all change sets generated by files in the File Group
Running the Deployment Packager from the Wizard
Once you have selected the SCM Integration method or defined and saved a valid Manifest File, the wizard's Run button will be enabled.
Click Run to start the Deployment Packager.
Progress information is shown in an Executing Script window.
Copyright © Liquibase 2012-2022 - Proprietary and Confidential