In my yaml config file for Azure DevOps CI, I have a CopyFiles@2 task in order to stage files for PublishBuildArtifacts. I want to (1) copy specific files from the root of my source directory, and (2) all the files from a specific folder. I can copy the specific files successfully, but when I add the line for the specific folder, it fails. Here is the yaml snippet:
- task: CopyFiles@2
inputs:
sourceFolder: $(Build.SourcesDirectory)
contents:
?(binclash.log|init-tools.log)
logs/**/*
targetFolder: $(Build.ArtifactStagingDirectory)
The folders tree for the source looks like:
<repo root>
`-- binclash.log
`-- init-tools.log
`-- logs
|-- debug
`-- release
`-- src
`-- ml.cs
As listed, this reports finding zero files. However,
if I remove logs/**/* then it successfully finds and copies binclash.log and init-tools.log. Is there some syntax related to quotes or line breaks that I am missing?