Creating a YAML Pipeline for Pull Request Workflows in Azure DevOps

Creating a YAML Pipeline for Pull Request Workflows in Azure DevOps

Jan 21, 2021

Azure DevOps pipelines allow you to create powerful automated workflows. Combining YAML pipelines with Redgate's SQL Change Automation and SQL Clone allow you to create production-like environments on-the-fly for database code review.

For the code shown in this demo, visit: https://documentation.red-gate.com/sca/deploying-database-changes/add-ons/azure-devops/create-a-yaml-pipeline-to-build-clone-inspect-code-and-deploy-for-a-pull-request-workflow

00:00 Begin the demo by making a change in SQL Change Automation in SSMS
02:33 Pushing the change to the central Git repo in Azure DevOps
03:08 Showing the branch policy I have configured for Build Validation
04:18 Creating the Pull Request
04:55 Viewing the pipeline definition YAML script
05:30 Why I'm using a self-hosted Agent
06:45 Viewing the SQL Change Automation build task and properties
08:00 Create a variable in the pipeline in a PowerShell task
08:40 Call SQL Clone to create a fresh environment to deploy the PR code
09:30 Create a Release Artifact with SQL Change Automation against the new database
10:25 Use a custom script to inspect the deployment script for problematic commands
11:50 Deploy the Release Artifact to the database
12:42 Review the build for our Pull Request
12:47 Re-running the pipeline with an override for custom script inspection
15:08 Watching the full pipeline execute successfully
16:38 Look at the Pull Request changes in our clone database
17:11 Using the Release Artifact for review