> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# dbmaestro/devops-automation

DBmaestro DevOps Platform, an enforced change management platform that automates and streamlines database development and deployment tasks. DBmaestro is the leading DevOps database solution provider for research and development organizations with multiple database vendors and environments. DBmaestro brings true continuous delivery – complete with the practices proven to be most effective for application development – to the database. Our product transforms development operations by:
  Dramatically increasing productivity
  Reducing development costs
  Adding a surefire safety net for database automation
These benefits are achieved by leveraging a guaranteed single point-of-truth source control system and a powerful impact analysis engine. The DBmaestro DevOps Platform automates and streamlines database development and deployment tasks and provides a centralized system for managing database development. The automated deployment solution simplifies the process of deploying changes from development to integration environments. Integral to the design is a sophisticated permission-architecture for customizing roles and ensuring security.


## Commands

### add-tag

Assign a Tag to an Object
- A Tag is a text descriptor for assigning attributes, properties and metadata to a package or script. For example, a Jenkins build number or build date. - A Tag must be associated with a Tag Type. Therefore, both the Tag Name and Tag Type Name must be specified. - A Tag may also be assigned to an Object through the DBmaestro DevOps Platform or by a package manifest. - An Object Name can be associated with more than one Object Type. Therefore, if ObjectName is specified, then ObjectTypeName must also be specified


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `object_name` | string |  | DBmaestro object name. |
| `object_type_name` | string |  | DBmaestro object type name. |
| `package_name` | string |  | DBmaestro package name |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tag_name` | string |  | DBmaestro tag name. |
| `tag_type_name` | string |  | DBmaestro tag type name. |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### add-tag-type

Add a Tag Type to the DBmaestro DevOps Platform
- A Tag Type must be created before a Tag can be assigned to an Object. - A Tag Type is a text descriptor for a Tag. For example, "custom", "task".


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tag_type_name` | string |  | DBmaestro tag type name. |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### apply-label

Perform Apply Label operation on an Environment
A label is an aggregation of the latest check-in for all objects in Source control for a schema or database.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `environment_name` | string |  | DBmaestro environment name |
| `label_description` | string |  | label description. |
| `label_name` | string |  | Label name. |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### backup-environment

Queue a Backup Environment Job


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `backup_description` | string |  | Backup description. |
| `backup_name` | string |  | Backup name. |
| `environment_name` | string |  | DBmaestro environment name |
| `ignore_env_version_mismatch` | enum | True | Ignore environment version mismatch |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### build

Queue a Build Environment job to the DBmaestro DevOps Platform
Available in SQL Server projects only


| Parameter | Type | Default | Description |
|---|---|---|---|
| `after_current_deployed_version` | enum | False | Ignore environment version mismatch |
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `baseline_label_name` | string |  | Name of label to be used as baseline |
| `environment_name` | string |  | DBmaestro environment name |
| `label_name` | string |  | Label name to be used or applied |
| `package_name` | string |  | Package name |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |
| `version_level` | enum |  | MAJOR or MINOR |
| `version_type` | enum |  | Specifies the version type to be used in build process |

### cancel-job

Cancel a Job in the DBmaestro DevOps Platform


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `job_id` | string |  | DBmaestro job id. |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### create-manifest-file

Create or Update a Package manifest file


| Parameter | Type | Default | Description |
|---|---|---|---|
| `operation` | enum | CreateOrUpdate | Package operation |
| `path_to_scripts_folder` | string |  | Path to sripts folder |
| `scripts_order_scope` | enum | Global | Scripts order scope |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |

### custom-build

Queue a CustomBuild Job to the DBmaestro DevOps Platform
Enables the build of scripts between any two projects/environments


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `baseline_environment_name` | string |  | Baseline environment name |
| `baseline_project_name` | string |  | Baseline project name |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `source_environment_name` | string |  | Source environment name |
| `source_label_name` | string |  | Label name to be used as source |
| `source_project_name` | string |  | Source project name |
| `source_version_type` | enum |  | Specifies the source version type to be used in build process |
| `target_environment_name` | string |  | Target environment name |
| `target_label_name` | string |  | Label name to be used as target in build process |
| `target_project_name` | string |  | Target project name |
| `target_version_type` | enum |  | Specifies the target version type to be used in build process |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### delete-project

Delete a Project


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name. |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### delete-project-mapping

Delete a Project Mapping from the DBmaestro DevOps Platform


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name. |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `target_project_name` | string |  | Target project name. |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### delete-tag

Delete a Tag from an Object


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `object_name` | string |  | DBmaestro object name. |
| `object_type_name` | string |  | DBmaestro object type name. |
| `package_name` | string |  | DBmaestro package name |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tag_name` | string |  | DBmaestro tag name. |
| `tag_type_name` | string |  | DBmaestro tag type name. |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### delete-tag-type

Delete a Tag Type
- If a Tag associated with a Tag Type has been assigned to an Object, then that Tag Type cannot be deleted.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tag_type_name` | string |  | DBmaestro tag type name. |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### display-project-mapping

Display a Project Mapping in the DBmaestro DevOps Platform


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name. |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `target_project_name` | string |  | Target project name. |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### download-automation-jar

Ensure environment has DBmaestroAgent.jar If not - download it


| Parameter | Type | Default | Description |
|---|---|---|---|
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |

### export-project

Export a Project to a .json file


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `file_path` | string |  | Full .json file path to project. |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name. |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### get-env-packages

Print a list of packages in an Environment


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `date_format` | string |  | Java SimpleDateFormat. |
| `environment_name` | string |  | DBmaestro environment name. |
| `file_path` | string |  | Full .json file path to project. |
| `from_date` | string |  | Start date from which to check. |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name. |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `to_date` | string |  | End date up to which to check. |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### get-latest

Update the Dev environment to the latest version or label for a project deployed by version, or to the latest package or label for a project deployed by task. The update environment operation is supported with the latest baseline


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `baseline_label_name` | string |  | Baseline label name |
| `create_scripts_only` | enum | False | Ignore environment version mismatch |
| `environment_name` | string |  | DBmaestro environment name |
| `label_name` | string |  | Label name |
| `package_name` | string |  | Source package name |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### get-roles

Retrieve all DBmaestro roles and save in a .csv file


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `file_path` | string |  | Full .json file path to project. |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### get-specific

Update the Dev environment to a specific version or label for a project deployed by version, or to a specific package or label for a project deployed by task. The update environment operation is supported with or without a baseline to allow preservation of developer changes to the Dev environment.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `baseline_label_name` | string |  | Baseline label name |
| `create_scripts_only` | enum | False | Ignore environment version mismatch |
| `environment_name` | string |  | DBmaestro environment name |
| `label_name` | string |  | Label name |
| `package_name` | string |  | Source package name |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### get-user-project-roles

Retrieve all DBmaestro users and roles listed by project and save in a .csv file


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `file_path` | string |  | Full .json file path to project. |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### import-project

Import a Project from a .json file


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `file_path` | string |  | Full .json file path to project. |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### package

Queue a Package Job to the DBmaestro DevOps Platform
- Creates a Package for an Environment - If Oracle scripts do not include the buffer flush directive ('/') and CancelJob has been issued, then a warning will be displayed next to the script unless suppressed and ignored through the -IgnoreScriptWarnings parameter. This warning CAN also be ignored deliberately through the DBmaestro DevOps Platform interface.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `file_path` | string |  | Full .json file path to project. |
| `ignore_script_warnings` | enum | True | Ignore/don't ignore warnings in scripts |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name. |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### pre-check

Perform a policy enforcement and pre-validation on a Package
- If a PreRun Environment has been created during Project creation, then a simulation is run in the PreRun Environment as well. The PreRun Environment option is not available in a DB2 project.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `package_name` | string |  | DBmaestro package name |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### pre-check-env

Perform a policy enforcement and pre-validation on a Package in an Environment


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `environment_name` | string |  | DBmaestro environment name |
| `package_name` | string |  | DBmaestro package name |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### project-mapping

Queue a Project Mapping to the DBmaestro DevOps Platform
- A Project Mapping must be constructed between two projects before the TransferUpPackage, TransferDownPackage or TransferPackage functions can be executed. The primary purpose of the mapping is to link schema differences between projects and enable constructing and managing a multi-project pipeline.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `keep_state` | enum | False | Keep the state of the package |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name. |
| `schema_map` | string |  | Link between source schema versus target schema. i.e. <'SchemaNameX1=SchemaNameY1,SchemaNameX2=SchemaNameY2...'> |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `target_project_name` | string |  | Target project name. |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `transfer_opened_package` | enum | False | Allow transferring open packages in TransferUpPackage and TransferDownPackage functions |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### restore-environment

Restore an Environment from a saved Backup


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `backup_name` | string |  | Backup name. |
| `environment_name` | string |  | DBmaestro environment name |
| `force_set_version` | enum | False | Ignore environment version mismatch |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### rollback

Queue a Rollback Environment Job to Database Release Automation
- If -CreateScriptsOnly is specified, then the Rollback Job is not queued. Instead, a Rollback Job package is created but not executed. The Rollback package will be available for execution in the Upgrade command.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `backup_behavior` | enum |  | <AlwaysCreateBackup> or <UsePolicy> or <SkipCreatingBackup> |
| `create_scripts_only` | enum | False | Execute package |
| `environment_name` | string |  | DBmaestro environment name |
| `label_name` | string |  | Label name to be used or applied |
| `package_name` | string |  | Label name to be used or applied |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `restore_behavior` | enum |  | <AlwaysRestore> or <SkipRestore> |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### run-package-dev

Perform Apply Label operation on an Environment
A label is an aggregation of the latest check-in for all objects in Source control for a schema or database.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `environment_name` | string |  | DBmaestro environment name |
| `package_name` | string |  | Package name. |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `script_type` | enum | Upgrade | <Upgrade> or <Downgrade> |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### set-version

Set the Environment Package version
- Validates that the Environment matches the Release Source deployed Package Label for the requested Package. If valid, sets the Target Environment to that version. - If -Force is specified, the Target environment version is set as requested, even if the validation fails.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `environment_name` | string |  | DBmaestro environment name |
| `force` | enum | False | Force the operation, ignoring usual operation block |
| `package_name` | string |  | Package name. |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### sync-permissions

Synchronize permissions for all Active Directory or LDAP users


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### transfer-down-package

Queue a DBmaestro DevOps Platform job to Transfer a Package from a Project to a downstream Target Project
- A Project Mapping must have been created before the function can be executed. - The Target Project must be at a lower level in the Project Mapping hierarchy than the Source Package.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `source_package` | string |  | Source package name |
| `target_package` | string |  | Target package name |
| `target_project_name` | string |  | Target project name |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |
| `version_level` | enum |  | MAJOR or MINOR |

### transfer-package

Queue a Project Transfer Job to the DBmaestro DevOps Platform
- A Project Mapping must have been created before the TransferPackage function can be executed.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `source_package` | string |  | Source package name |
| `target_package` | string |  | Target package name |
| `target_project_name` | string |  | Target project name |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |
| `version_level` | enum |  | MAJOR or MINOR |

### transfer-up-package

Queue a DBmaestro DevOps Platform job to Promote a Package from a Project to an upstream Target Project - A Project Mapping must have been created before the function can be executed. - The Target Project must be at a higher level in the Project Mapping hierarchy than the Source Package.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `source_package` | string |  | Source package name |
| `target_package` | string |  | Target package name |
| `target_project_name` | string |  | Target project name |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |
| `version_level` | enum |  | MAJOR or MINOR |

### update-project

Update a Project from a .json file


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `file_path` | string |  | Full .json file path to project. |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### update-tag-type

Add a Tag Type to the DBmaestro DevOps Platform
- A Tag Type must be created before a Tag can be assigned to an Object. - A Tag Type is a text descriptor for a Tag. For example, "custom", "task".


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `new_tag_type_name` | string |  | New tag type name. |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tag_type_name` | string |  | DBmaestro tag type name. |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### upgrade

Queue an Upgrade Environment Job to the DBmaestro DevOps Platform


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `backup_behavior` | enum |  | <AlwaysCreateBackup> or <UsePolicy> or <SkipCreatingBackup> |
| `environment_name` | string |  | DBmaestro environment name |
| `package_name` | string |  | Label name to be used or applied |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `restore_behavior` | enum |  | <AlwaysRestore> or <SkipRestore> |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tag_name` | string |  | Tag name |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### validate

Validate an Environment with Database Release Automation
Checks for environment drift from specified version


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `environment_name` | string |  | DBmaestro environment name |
| `package_name` | string | @currentversion | DBmaestro package name. By default runs validation against current version |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

### view-labels

Print out a list of labels for an Environment


| Parameter | Type | Default | Description |
|---|---|---|---|
| `auth_type` | env_var_name | DBMAESTRO_AUTH_TYPE | DBmaestro auth type |
| `environment_name` | string |  | DBmaestro environment name |
| `password` | env_var_name | DBMAESTRO_PASSWORD | DBmaestro password |
| `project_name` | string |  | DBmaestro project name |
| `server_address` | env_var_name | DBMAESTRO_SERVER_ADDRESS | DBmaestro server address |
| `tool_path` | env_var_name | DBMAESTRO_TOOL_PATH | Path where the DBmaestroAgent.jar is located |
| `use_ssl` | env_var_name | DBMAESTRO_USE_SSL | Use or don't use SSL/https protocol to connect to the DBmaestro agent. Default is n. |
| `username` | env_var_name | DBMAESTRO_USERNAME | DBmaestro username |

## Examples

### build-run

This job will create project package by Buid, deploy it to the Release source and QA environments Then - transfer this package to "Release" project and deployed to Release Source and Production
Job description
  1. Package is created using build command for environment Dev_Env_1 for project "Development"
  2. Release source is being updated to the latest version using update command at project "Development"
  3. Same package is being deployed to the QA environment at project "Development"
  4. Package is being transferred to the project "Release"
  5. Release source at project "Release" is being updated to the latest version using update command
  6. Finally, package is being deployed to the Production environment (Prod_Env_1) of "Release" project


```yaml
version: '2.1'
orbs:
  dop: dbmaestro/devops-automation@1.0.0
jobs:
  dbm-deploy:
    docker:
      - image: cimg/openjdk:16.0.2
    environment:
      DBMAESTRO_AUTH_TYPE: DBmaestroAccount
      DBMAESTRO_SERVER_ADDRESS: dbm.automation.host:8017
      DBMAESTRO_USERNAME: test@dbmaestro.com
    steps:
      - checkout
      - dop/download-automation-jar
      - dop/build:
          environment_name: Dev_Env_1
          project_name: Development
          version_level: MAJOR
      - dop/upgrade:
          environment_name: Release Source
          package_name: '@latestversion'
          project_name: Development
      - dop/upgrade:
          environment_name: QA_Env_1
          package_name: '@latestversion'
          project_name: Development
      - dop/transfer-up-package:
          project_name: Development
          source_package: '@latestversion'
          target_project_name: Release
          version_level: MINOR
      - dop/upgrade:
          environment_name: Release Source
          package_name: '@latestversion'
          project_name: Release
      - dop/upgrade:
          environment_name: Prod_Env_1
          package_name: '@latestversion'
          project_name: Release
workflows:
  test-run:
    jobs:
      - dbm-deploy
```

### package-run

This job will create project package from user created scripts and a package manifest using the Package command, and then deploy it to the Release source.
The package manifest is a .json file named Package.json consisting of a header section and an array of script sections in the order in which the scripts should be executed when an environment is upgraded or downgraded. The upgrade and downgrade scripts are stored in the Upgrade and Downgrade directories respectively. These two directories are subdirectories of another directory. Details are specified in https://dbmaestro.atlassian.net/wiki/spaces/DBm20Docs/pages/1173331919/Generating+Project+Packages+by+Automation
Job description
  1. Package manifest is created using create-manifest command
  2. Package folder is being zipped
  3. New package is being imported to DBmaestro using package command
  4. Package is being pre-checked using pre-check command
  5. Release source is being updated using update command


```yaml
version: '2.1'
orbs:
  dop: dbmaestro/devops-automation@1.0.0
jobs:
  dbm-deploy:
    docker:
      - image: cimg/openjdk:16.0.2
    environment:
      DBMAESTRO_AUTH_TYPE: DBmaestroAccount
      DBMAESTRO_SERVER_ADDRESS: dbm.automation.host:8017
      DBMAESTRO_USERNAME: test@dbmaestro.com
    steps:
      - checkout
      - dop/download-automation-jar
      - dop/create-manifest-file:
          path_to_scripts_folder: V3
      - run:
          command: cd V3&&zip -r ../V3.zip *&&cd ..
          name: Zip the package
      - dop/package:
          file_path: V3.zip
          project_name: DEMO
      - dop/pre-check:
          package_name: V3
          project_name: DEMO
      - dop/upgrade:
          environment_name: Release Source
          package_name: V3
          project_name: DEMO
workflows:
  test-run:
    jobs:
      - dbm-deploy
```