DrJohnT / AzureDevOpsExtensionsForSqlServer

Microsoft SQL Server deployment extensions for Azure DevOps Pipelines
MIT License
21 stars 14 forks source link

[BUG] DeployScript and DeployReport Task Options Not Used #34

Open ksullivan1856 opened 3 years ago

ksullivan1856 commented 3 years ago

Component

Describe the bug When using the DeployScriptPath and/or DeployReportPath task options, they are not honored during task execution. See this line in the PublishDacPacTask: https://github.com/DrJohnT/AzureDevOpsExtensionsForSqlServer/blob/83c6e88944ca86938aae15c723c6b4d9a0ad97f5/extensions/PublishDacPac/PublishDacPacTask/PublishDacPacTask.ps1#L91

Variable: $DeployScriptPath or $DeployReportPath is never assigned at the beginning of the task where all the task inputs are collected, starting at: https://github.com/DrJohnT/AzureDevOpsExtensionsForSqlServer/blob/83c6e88944ca86938aae15c723c6b4d9a0ad97f5/extensions/PublishDacPac/PublishDacPacTask/PublishDacPacTask.ps1#L24

To Reproduce Run PublishDacPacTask with DeployScriptPath and DeployReportPath populated (not empty). The result will be an actual publish action to the target database rather than creating a deployment script.

Expected behavior When DeployScriptPath is not an empty string, a publish script should be created, the database should NOT be updated.

Screenshots

image

image

Azure DevOps Agent Self-Hosted Agent: Version 2.144.2