azure-devops-server-2019

Azure DevOps Server (onPrem) SQL DB Deploy - how to add certificate trust?


I am using TFS (Azure DevOps Server 2019) and am trying to use the SQL DB Deploy (version 0.*) step to perform a publish of a SQL script.

I am getting the error: The connection was successful -- The certificate chain was issued by an authority that is not trusted

I believe the solution is to add TrustServerCertificate=True to the connection string.

Does anyone know how to add this in the DevOps step?

Regards


Solution

  • I have been facing the same error lately. After multiple attempts and trying several combinations, I was able to figure out a way by which we can pass an additional argument in the SQL Server Database Deploy task in DevOps Release pipeline to have the encrypt connection property set to false same as below:

    -EncryptConnection:0
    

    Attaching a screenshot of the pipeline too below:

    enter image description here