What is Scripts?
Scripts are list of commands that you can configure to run on a server before or after a deployment. These can be anything your server supports, such as starting or stopping apache services, or any service related to your app, or running a database migration. Scripts can also be used as Build Pipeline.
How to add Script?
To add a Script files, Go to projects > Select your Project in which you would like to add the scripts, then click on the Scripts tab > Click to add a new Script,
- Add the name that can be memorized.
- Provide the list of commands in the script that you would like to execute.
- Select if the script you have written is a rollback script.
- Select if you would like to stop further execution if script fails.
- Availability is an option on when you would like to run the script.
If you are planning to execute the script only during first deployment like to install some rpm packages then you can do that too by selecting run on First Deployment.
Scripts can also be used for Build Pipeline like running
- npm install
- composer install