Reputation: 30045
Am trying to deploy Az SQL dacpac through DevOps pipeline:
Code:
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.Repository.LocalPath)/ADFConfig/Deploy/ADFConfig.dacpac'
ArtifactName: 'drop'
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
ArtifactName: 'drop'
downloadPath: '$(System.ArtifactsDirectory)'
- task: SqlAzureDacpacDeployment@1
displayName: 'Azure SQL DacpacTask'
inputs:
azureSubscription: 'ServiceConnection-arm-iv-ea-${{ variables.subCode }}-dw-${{ variables.environmentToDeploy }}-rg-01'
ServerName: 'iv-ea-${{ variables.subCode }}-sql-dw-${{ variables.environmentToDeploy }}.database.windows.net'
DatabaseName: ADFConfig
SqlUsername: dwadmin
SqlPassword: $(sqladminpassword)
DacpacFile: '$(Pipeline.Workspace)/drop/ADFConfig.dacpac'
Download Artifacts are in:
Downloading drop/ADFConfig.dacpac to D:\a\1\a\drop\ADFConfig.dacpac
Downloaded drop/ADFConfig.dacpac to D:\a\1\a\drop\ADFConfig.dacpac
SqlAzureDacpacDeployment error is:
##[error]No files were found to deploy with search pattern D:\a\1\drop\ADFConfig.dacpacCheck
What am doing wrong?
Upvotes: 0
Views: 525
Reputation: 16563
Well, you’re publishing from $(Build.Repository.LocalPath), then downloading to $(System.ArtifactsDirectory), but then asking the deployment task to look in the $(Pipeline.Workspace) directory.
Change $(Pipeline.Workspace) to $(System.ArtifactsDirectory).
Upvotes: 1