0

I set up an SSDT SQL Server project in Visual Studio from where I can publish my database to on-premises target environment successfully. The requirement is however to use a CI/CD pipeline in VSTS to automate our build and deployment of this database project.

The initial task of creating a build which generates a dacpac as a build artifact and then get copied to a drop folder on the on-premises build agent is also in place and successfully implemented.

The issue I am facing now is that my Release definition to perform the deployment to our target on-premises environment just won't work, even though it completes successfully with a green Deployment Status of "SUCCEEDED".

Not sure where to start as far as troubleshooting is concerned, but below is a screenshot of my settings/configuration for the SQL Server Deploy Dacpac Task which is expected to perform the release/deployment. Is there anything on here or elsewhere that I may be doing wrong?

enter image description here

halfer
  • 19,824
  • 17
  • 99
  • 186
hitman126
  • 699
  • 1
  • 12
  • 43

1 Answers1

1

It seems the Path or path root option of the SQLServer Deploy Dacpac task does not specify correctly.

You are using $(Build.ArtifactStagingDirectory) for the Path or path root option, while the predefined variable $(Build.ArtifactStagingDirectory) should only be used in build instead of release.

And you can use $(System.ArtifactsDirectory) or $(System.DefaultWorkingDirectory) for Path or path root option of the SQLServer Deploy Dacpac task.

enter image description here

Marina Liu
  • 36,876
  • 5
  • 61
  • 74