0

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?

1 Answer 1

1

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).

Sign up to request clarification or add additional context in comments.

1 Comment

Oops!..thanks Moho.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.