Using Azure DevOps YAML in a database project build and release pipeline
This bit of code correctly picks up my four dacpac files, I can see these being copied in the console
- task: CopyFiles@2
displayName: Copy build output to artifacts staging
inputs:
SourceFolder: "$(Build.SourcesDirectory)"
flattenFolders: true
Contents: '**\bin\**\*.dacpac'
TargetFolder: "$(Build.ArtifactStagingDirectory)"
This bit of code correctly picks up my publish files, I can see these being copied in the console
- task: CopyFiles@2
displayName: Copy build output to artifacts staging
inputs:
SourceFolder: "$(Build.SourcesDirectory)"
flattenFolders: true
Contents: '**\PublishProfile\*.publish.xml'
TargetFolder: "$(Build.ArtifactStagingDirectory)"
This bit of code reports "zero files found"
- task: CopyFiles@2
displayName: Copy build output to artifacts staging
inputs:
SourceFolder: "$(Build.SourcesDirectory)"
flattenFolders: true
Contents: |
'**\bin\**\*.dacpac'
'**\PublishProfile\*.publish.xml'
TargetFolder: "$(Build.ArtifactStagingDirectory)"
This pipe multiline syntax is all over the examples https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/copy-files?view=azure-devops&tabs=yaml#examples
I've also used Get-ChildItem to doubly confirm that the files exist.
It seems like | / multiline doesn't work as described.