---
title: "Automatic Deployment"
canonical: "https://docs.vaultspeed.com/space/VPD/3012624394/Automatic%20Deployment"
format: markdown
---
**Table of Contents**

> Macro (toc)

The Automatic Deployment feature allows users to deploy their code automatically into GIT, database links, or custom scripts as configured by VaultSpeed. This feature supports multiple deployment workflows, including Database Link, GIT, and Custom Script options. 

## Prerequisites

Before deploying, ensure the following configurations are complete:

- **Database Link Deployments**:
  - Verify that the JDBC connection is properly configured in VaultSpeed.
- **GIT Deployments**:
  - The target repository and connection must be preconfigured in VaultSpeed. For detailed instructions, refer to the [GIT Deployment](https://vaultspeed.atlassian.net/wiki/spaces/VPD/pages/3013148700) page.
- **Custom Script Deployments**:
  - Define the script path in the `connections.properties` file.

> 📝 For detailed guidance on deployment processes, see the [Continuous Pipeline Deployment Documentation](https://vaultspeed.atlassian.net/wiki/spaces/VPD/pages/3011248154).
> 📝 
> 📝 Make sure to consult this document before deploying Oracle SQL, ODI, Talend, or Snowflake SQL

## How to Deploy

To deploy code, follow these steps:

1. Navigate to the **Automatic Deployment** page.
2. Locate the **generation run** you wish to deploy.
3. Click the **Deploy** button in the **Actions** column.

![image](media://3312aadb-1968-4e1e-9f05-24e38516e05a)

4. In the modal, choose one of the deployment options:
  - **Database Link**
  - **GIT**
  - **Custom Script**

## Deployment Options

### Database Link Deployment

The **Database Link** deployment option uses JDBC connections to deploy code directly to a database.

**Steps**:

1. Select **Database Link** in the **Deploy** modal.
2. Choose the desired database link from the dropdown menu.
3. Click **Deploy** to initiate the process.

> 📝 **Notes for Database Link Deployments:**
> 📝 
> 📝 - Ensure that the database link is configured correctly in VaultSpeed.
> 📝 - The VaultSpeed agent will use the selected JDBC connection to deploy the code.

### GIT Deployment

When deploying via GIT, you can now specify the Branch Name in addition to the Connection Name.

1. Select GIT in the Deploy modal.
2. Specify the connection to GIT in the Connection Name field.
  - This should match a connection configured in your settings.
3. Enter the target branch name in the Branch Name field.
4. Navigate to the [Storing Connections](https://vaultspeed.atlassian.net/wiki/spaces/VPD/pages/3291381934) page.
5. Edit the GIT connection and ensure it is linked to the correct repository.
6. Add a valid branch name that corresponds to an existing branch in your repository.
7. Click **Deploy** to start the deployment process.

![screenshot_2024-12-18_at_20.04.55.png](media://de11b469-a79a-40e4-b846-7912a844cb7a)


> 📝 **Notes:**
> 📝 
> 📝 - Deploying via GIT now supports specifying a branch name. Ensure that the specified branch exists in your repository before deployment.
> 📝 - If no branch name is provided, the deployment will proceed using the branch currently checked out on the local agent host’s filesystem.
> 📝 - If the branch does not exist prior to deployment, the deployment will fail, and the following error will appear in the agent logs:  
> 📝 *"Error: Target branch <branch_name> does not exist. Ensure the branch is available in the remote repository and try again."*
> 📝 - To avoid deployment errors, always verify the branch name matches the repository’s structure.
> 📝 - Configuring the branch name dynamically ensures better control of your deployment workflow.

### Custom Script Deployment

To deploy via a Custom Script, ensure the script is configured in the `connections.properties` file.

**Steps:**

1. Select **Custom Script** in the Deploy modal.
2. Verify that the script is correctly defined in the `connections.properties` file.

**Example:**

```
<connection_name>.cmd = /path/to/your/custom_script.sh
```

3. Click **Deploy** to execute the script.

> 📝 **Notes:**
> 📝 
> 📝 - Custom Script Deployment now allows users to **define scripts dynamically** in `connections.properties`, consolidating all connection-related settings in one place.
> 📝 - This method provides **greater flexibility** and integrates with **CI/CD pipelines**.
> 📝 - Ensure the **VaultSpeed agent** has the necessary **permissions** to execute the script.

## Background Tasks

- All deployments run as background tasks.
- Monitor progress in the **Running Tasks** window (accessible via the button in the bottom-right corner of the screen).
- Failed deployments will display an error status with additional troubleshooting information.