Skip to content

Latest commit

 

History

History

DacPacReport

Colin's ALM Corner Build Tasks - DacPac Change Report

DacPac Change Report Task

YAML

steps:
- task: colinsalmcorner.colinsalmcorner-buildtasksbeta.dacpac-report-task.DacPacReport@1
  displayName: 'DacPac Schema Compare MyDBProject.dacpac'
  inputs:
    # dropName: drop  # name of the published artifact that contains the dacpac for the build: the dacpac is downloaded from this drop.
    dacpacName: MyDBProject  # name of the dacpac (without extension) to compare
    targetDacPacPath: MyDBProject\bin\$(BuildConfiguration)  # Path to dacpac in this build (to compare to output of previous build)
    # extraArgs: '/Variables myvar=myvalue'  # extra args for the compare - use to supply SQLCMD variables, for example.
    # reverse: false  # set to true to reverse source and target for compare
    # userSqlPackagePath: '' # the sqlpackage.exe filepath - use this only if the default does not detect the path correctly

Overview

This task shows the schema changes of a DacPac between builds. The task adds two sections to the build summary:

  1. Schema Change Summary: A summary of changes from the last build.
  2. Change Script: The SQL-CMD script that would be generated if deploying from the newer dacpac model against the older model.

Settings

The task requires the following settings:

  1. Drop Name: The drop name of the build that contains the dacpac file. You must publish the dacpac for this task to work.
  2. DacPac Name: Name of the DacPac to analyze (without .dacpac extension).
  3. Compiled DacPac Path: Path to the DacPac file that this build will produce. Typically the bin\$(BuildConfiguration) path of the SSDT project.

OAuth Token

You must enable Allow Scripts to Access OAuth Token on the build Options. If you do not, you will see 403 errors.