---
title: "Custom Scripts"
canonical: "https://docs.vaultspeed.com/space/VPD/3013771287/Custom%20Scripts"
format: markdown
---
VaultSpeed allows you to use **multiple** custom scripts to deploy the generated code. This enables seamless integration with CI/CD pipelines and version control.

**To set up multiple custom deployment scripts**, refer to the [Custom Deployment Script Configuration](https://docs.vaultspeed.com/space/VPD/4240507056/Custom+Deployment+Script+Configuration) page for detailed setup instructions. You will need to define a separate connection for each script in the agent’s **connections.properties** file. Each connection must specify a unique deployment script, allowing flexibility across different environments.

## Defining Connections in `connections.properties`

Each script must be assigned a separate **connection** inside the `connections.properties` file. This setup allows the VaultSpeed agent to differentiate between scripts for different environments.

## Configuring Deployment Connections

### **Example Configuration**

### Connection 1:

- Name: `my_project_connection_1`
- Type: `database_type` (Ensure the specified database type is supported by VaultSpeed; refer to the [Supported Technology Matrix](https://vaultspeed.atlassian.net/wiki/spaces/VPD/pages/3084025875) for details.)
- Deployment Script: `/path/to/custom_deploy_script_1.sh`

### Connection 2:

- Name: `my_project_connection_2`
- Type: `database_type` (Refer to the Supported Technology Matrix to confirm compatibility.)
- Deployment Script: `/path/to/custom_deploy_script_2.sh`

### Selecting the Correct Connection at Runtime

At runtime, users **must select the correct connection** to execute the corresponding custom deployment script.

> 📝 **Note:**
> 📝 
> 📝 The agent will reference this file when deploying code. You no longer need to modify the `client.properties` file.

### Executing a Custom Deployment

Once the **custom deployment script** is configured and available, follow these steps to deploy using a **Custom Script**.

1. **Go to the Automatic Deployment Menu**
  - Navigate to **VaultSpeed > Automatic Deployment**.
2. **Select the File to Deploy**
  - Locate the **file you want to deploy** in the list.
3. **Choose the Custom Script Option**
  - Select **Custom Script** from the sidebar menu.
4. **At Runtime, Select the Deployment Connection**
  - Choose the **connection corresponding to the custom deployment script** you want to use.
5. **Execute the Deployment**
  - The agent will **execute the steps** in your custom deployment script.

![image-20241220-153416.png](media://e2fc95d6-f707-4f4a-a58e-61e2618f959c)

### **Custom FMC Deployment Script Example**

Below is an example of a **custom script for FMC deployment** in a **UNIX environment**.

This script performs the following actions:  
✔ **Copies** the generated FMC (Airflow) files to a temporary directory.  
✔ **Unzips** the files to extract the necessary contents.  
✔ **Removes** any remaining `.zip` files to clean up the directory.  
✔ **Moves** the extracted files to the **Airflow DAGs** location.

```shell
#!/bin/bash
cp /vaultspeed/agent/generated_files/$1 /vaultspeed/unzip/.
unzip /vaultspeed/unzip/$1
rm -rf /vaultspeed/unzip/*.zip
cp /vaultspeed/unzip/* /vaultspeed/airflow/dags/.
```