VSTS Build + Azure Database + Redgate ReadyRoll

418 views Asked by At

I'm trying to make a CI/CD pipeline for my database on VSTS and deploy it on an Azure SQL Server using Redgate ReadyRoll. But I'm stuck at the build process. Here are the tasks I use :

  • Setup a Shadow DB

enter image description here

  • Build solution

enter image description here

  • Copy Publish Artifact

Here are the variables used :

enter image description here

But at the second task (Build solution), I have an issue to connect to the Azure Database :

packages\ReadyRoll.MSBuild.1.14.7.4267\tools\ReadyRoll.Data.Schema.SSDT.targets(145,5): Error : An error occurred while attempting to verify your deployment scripts: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

The login/password are correct, I checked multiple times. I tried the Hosted agent as well as a private agent (on my own machine) but I have the same error.

Can you help me with that ?

1

There are 1 answers

0
starian chen-MSFT On

You can check these things:

  1. ShadowServer login account, it uses build service account if you don’t specify ShadowUserName and ShadowPassword. So go to local service > Double click build agent service> Change to your account
  2. Azure SQL Server firewall rule. (The Hosted agent IP is not in Azure SQL Server firewall rule, you can add your private build agent IP to Azure SQL Server firewall rule and queue build with your build agent)