SQL Change Automation 4

Use the Bamboo add-on with a SQL Change Automation Project

This tutorial takes you through each stage of setting up a database pipeline using Atlassian Bamboo and the SQL Change Automation Bamboo pluginYou'll use the plugin to build, test, sync and publish a SQL Change Automation project.

1. Prerequisites

Make sure you have the following:

2. Install the SQL Change Automation plugin

3. Add a Build task

You'll add the build step using one of Redgate's build plan for Bamboo. 

  • Create a plan. See Creating a plan.
  • In Configure tasks, click Add task
  • Click Redgate SQL Change Automation Build task
  • Under Database project, select Build a SQL Change Automation project 
  • Under Build artifact, enter a name for the NuGet Package ID. This is the name of the NuGet package you'll create. The name must be unique and can't contain spaces.
  • Under Temporary database server, select SQL LocalDB. If you need a custom SQL Server, select SQL Server and provide additional connection details.
    SQL Change Automation uses a temporary database to recreate and validate a temporary version of your database. The temporary database is dropped once the build is complete.
  • (Optional) SQL Change Automation can include SQL Doc database documentation in the NuGet package that it builds. To select this option, under Database documentation, click Include database documentation.
  • (Optional) Under SQL Change Automation version, select Specific and provide the specific version of SQL Change Automation that will be used. By default, the latest version is used.
  • Click Save

4. Add a Test task

The test step allows Bamboo to run tSQLt tests included in your database. For more info read tSQL and SQL Test.

  • Edit your plan.
  • In Configure tasks, click Add task
  • Click Redgate SQL Change Automation Test task
  • Under Test source, select Test a SQL Change Automation project using tSQLt tests
  • Under Temporary database server, select SQL LocalDB. If you need a custom SQL Server, select SQL Server and provide additional connection details.
  • For the Run tests option, select Run every test.
  • (Optional) Check Generate test data before testing if you intend to automatically populate the database with test data.
  • (Optional) Under SQL Change Automation version, select Specific and provide the specific version of SQL Change Automation that will be used. By default, the latest version is used.
  • Click Save

5. Run a Build

  • Open your Build Dashboard
  • Click on your project
  • Click on the run icon for the plan. See Running a plan build.

6. Add a Sync task

  • Edit your plan.
  • In Configure tasks, click Add task
  • Click Redgate SQL Change Automation Sync task
  • Under Build artifact to sync, insert the NuGet Package ID. This must be the same ID used to configure the Build step.
  • Under Target database, enter the name of the target server and database you want to update and the SQL Server credentials if needed.
  • (Optional) Under Output artifact, check Output the update script used during deployment if needed
  • (Optional) Under SQL Change Automation version, select Specific and provide the specific version of SQL Change Automation that will be used. By default, the latest version is used.
  • Click Save

7. Add a Publish task

  • Edit your plan.
  • In Configure tasks, click Add task
  • Click Redgate SQL Change Automation Publish task
  • Under Build artifact to publish, insert the NuGet Package ID. This must be the same ID used to configure the Build step.
  • Under NuGet Feed, provide the NuGet feed URL
  • Click Save

Didn't find what you were looking for?