Create VSTS/TFS release
Published 29 March 2016
If you haven't already, follow the instructions in Create VSTS/TFS build.
This page walks you through the process of creating a release on VSTS/TFS.
Start with the empty release definition template
- In VSTS/TFS, create a new release definition
- Click Empty process
Add the build artifact
- Click Add artifact
- Select the build definition you created earlier
- Click Add
Add a PowerShell task
- Click the Tasks tab
- Next to Agent phase, click the plus symbol
- Select the PowerShell task (can be found under the Utility tab)
- Click Add
- Set the Name field, e.g. "Set the SqlCmd location in the Path"
- In the Type field, select Inline
- In the Script field, enter:
$sqlCmdPath = "C:\Program Files\Microsoft SQL Server\110\Tools\Binn";
Write-Host "##vso[task.setvariable variable=PATH;]${env:PATH};${sqlCmdPath}";
Add a ReadyRoll Deploy Database Package task
- Click the Tasks tab
- Next to Agent phase, click the plus symbol
- Select the ReadyRoll Deploy Database Package task
- Click Add
- In the left pane, click ReadyRoll Deploy Database
- In the Package to deploy field, select the PowerShell script created by the build, for example,
<project_name>_DeployPackage.ps1
- Fill in the fields for the database you want to deploy to
Next
- Click the Pipeline tab
- Finish configuring the release definition, for example, by changing the environment name, cloning the environment, etc.
Finally
- Click Save
- In the dialog, click OK
If you want to run tSQLt tests as part of your VSTS/TFS release, see Tutorial: Integrating tSQLt tests with Visual Studio Team Services.