Get started with deployment scripts
Deployment scripts are a set of customizable scripts that can be executed at different stages of the deployment process. They are divided into several stages that execute at different points in the deployment process:
- pre-build - These scripts are executed before the deployment process begins building the application and are designed to change the application code for the upcoming deployment.
- post-build - To perform any necessary cleanup or configuration tasks after the deployment process has finished building the application, post-build scripts can be used.
Deployment scripts in Hubble Studio software are highly customizable and can be used to automate various deployment tasks, such as updating configuration files, or sending notifications to team members.
Note that any modifications or deletions of deployment scripts may affect the behavior of your deployments, so make sure to test your changes thoroughly before deploying to production. If you have any questions or issues with deployment scripts in hubble Studio, don't hesitate to reach out to our support team for assistance.
Execution Order of deployment scripts
Deployment scripts in hubble Studio are executed in the order in which they appear in the Scripts tab of your project. You can change the order of deployment scripts by clicking the "Up" and "Down" arrows to move them into the desired order.
Keep in mind that deployment scripts are executed one after the other, so the order of execution can be important if you rely on the previous scripts changing files for example.
That's it! Deployment scripts in hubble Studio give you powerful control over the deployment process, and with the ability to modify, delete, and sort them, you can customize your deployments to fit your needs.
Create deployment scripts
To create a new deployment script, open your project and navigate to Scripts > Add script. There you can give your script a descriptive name and choose at which stage in the deployment process it will run. Select the type of script you want to add and fill in its content.
We currently only support a limited type of scripting languages:
- Shell - Shell scripts are executable files containing a series of commands written in a shell language (such as Bash).
If your happy with the content of your script you can add it to your project via the Add script button.
Modify deployment scripts
- To modify deployment scripts, first navigate to your project's Scripts tab.
- Once you're in the Scripts tab, you will see a list of all the deployment scripts in your project. Find the script you want to modify and click the pencil icon.
- In the script details page, you will see the script's name, stage, and the code that makes up the script. Modify the script's code to your liking.
- After making the desired changes, click the "Update script" button to apply the changes.
That's it! Your deployment script has been modified and will now be executed the next time you deploy to your environment.
Deleting deployment scripts
- To delete deployment scripts, navigate to your project's Scripts tab.
- Find the script you want to delete and click on its trash icon.
That's it! The deployment script has been deleted from your project and will not be executed during future deployments.