Use the VSTS Build extension with ReadyRoll
Published 03 April 2018
If you have any feedback on this feature please let us know in our forum.
This tutorial takes you through each stage of setting up a database build pipeline using Visual Studio Team Services (VSTS) and the DLM Automation Build extension. You'll use the extension to validate and build a ReadyRoll project.
1. Prerequisites
Make sure you have the following:
- An existing Visual Studio Team Services (VSTS) or TFS (2015 Update 2 or later) project. See Create a team project.
- An existing ReadyRoll project in source control. See Getting started with ReadyRoll if you don't have one
- DLM Automation 2: Build VSTS plugin installed. See Set up the VSTS Build extension.
2. Create a build definition
You can now create a VSTS build definition for your ReadyRoll project.
- Go to your project in VSTS.
- In the top menu, click Build and Release.
- Click New definition
- Choose your source control system and provide the details to connect to it. Once completed click Continue.
- Click on Empty process at the top of the Select a template page.
- 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.
- Search for Redgate DLM Automation 2: Build task and click Add.
- Click the Build task that has been added as part of phase 1.
- In Operation, select Build a ReadyRoll project.
- In ReadyRoll project, click the ellipsis (…). Select your ReadyRoll .sqlproj file.
- In Output NuGet package ID, enter a package name (e.g the name of your database).
3. Run the build definition
We're now ready to run the build definition. This will check that the ReadyRoll project will deploy to an empty database.
- While editing the build definition click the Save & queue drop down at the top of the page.
- From the drop down menu select Save & queue.
- 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.
- Click on Build <number> to see a summary of the build.
- On the left hand side of the screen click on Build Project to see the log output of the DLM Automation Build step. If there's a build error, this is a good place to start investigating.