SQL Change Automation 4

Use the Azure DevOps Build extension with SQL Source Control Project

This tutorial takes you through each stage of setting up a database build pipeline using Azure DevOps and the SQL Change Automation Build extension. You'll use the extension to validate and build a SQL Source Control project.

1. Prerequisites

Make sure you have the following:

  • An existing Azure DevOps. See Create a team project.
  • An existing SQL Source Control project in source control.
  • SQL Change Automation: Build Azure DevOps plugin installed.

2. Create a build definition

You can now create a Azure DevOps build definition for your SQL Change Automation project.

  1. Go to your project in Azure DevOps.
  2. In the top menu, click Build and Release.
  3. Click New definition

  4. Choose your source control system and provide the details to connect to it. Once completed click Continue.
  5. Click on Empty pipeline at the top of the Select a template page.
  6. On the left of the screen you should see the phases of your build. In Phase 1, click the plus icon to add a task.
  7. Search for SQL Change Automation task and click Add.
  8. Click the Build task that has been added as part of phase 1.
  9. In Operation, select Build a SQL Source Control project.
  10. In Output NuGet package ID, enter a package name (for example, the name of your database).

3. Run the build definition

We're now ready to run the build definition. This will check that the SQL Change Automation project will deploy to an empty database.

  1. While editing the build definition click the Save & queue drop-down menu at the top of the page.
  2. From the drop-down menu select Save & queue.
  3. Review the branch and commit to be built and click Save & queue to start the build.

4. Reviewing the build output

Once the build it's complete, you can investigate the build output.

  1. Click on Build <number> to see a summary of the build.

  2. On the left-hand side of the screen click on Build Project to see the log output of the SQL Change Automation Build step. If there's a build error, this is a good place to start investigating.

      



Didn't find what you were looking for?