Step 20 - Deploy Azure SQL DacPac - Build
  • 18 Nov 2019
  • 1 Minute to read
  • Contributors
  • Comment
  • Dark
    Light
  • PDF

Step 20 - Deploy Azure SQL DacPac - Build

  • Comment
  • Dark
    Light
  • PDF

Article summary

In this task we will use the DacPac file that was produced and use the Azure DevOps Azure SQL DacPac task to publish the changes to the database. Using DacPac it will workout what changes need to be applied and deploy them to the database.

A picture of the configuration of this task is below:

image.png

YAML

Below is the yaml from this task:

variables:
  sql_server_name: '[tbc]'
  sql_database_name: '[tbc]'
  sql_administrator_login: '[tbc]'
  sql_administrator_login_password: '[tbc]'

steps:
- task: SqlAzureDacpacDeployment@1
  displayName: 'Azure SQL DacpacTask'
  inputs:
    azureSubscription: '[tbc]'
    ServerName: '$(sql_server_name).database.windows.net'
    DatabaseName: '$(sql_database_name)'
    SqlUsername: '$(sql_administrator_login)'
    SqlPassword: '$(sql_administrator_login_password)'
    DacpacFile: '$(Build.ArtifactStagingDirectory)\Database\*.dacpac'


Was this article helpful?