This article explains how to add a SQL task to execute sql run SQL scripts from a file using the app, SQL for Bamboo on Server SQL for Bamboo app on server.
Instructions
- Log in as a Bamboo Administratoradministrator. Ensure you have a project and a plan with respective stages and jobs configured. We shall use
- Use Project = Demo and Plan = Demo_plan as mentioned in the in the example below example:
- Click on a job. In the example below, Demo_job2 > Add task > select SQL task.
Provide all the details like description, Script location, Script, and database profile and click on Save as shown:
Below is theSQL configuration details and click Save.
Consider an example persons.sql file:
Now, click on Click Run plan for to run the SQL task to get executed.
The output will result results in the table creation in the database.
Note - Ensure you have have SQL for Bamboo app installed installed in your Bamboo instance.
- If Script script location is Filefile, make sure ensure to place the .sql file in that particular project with plan and job configured and directory, <BambooHome> <BambooHome>/xml-data/builds-dir/project-plan-job>.