Version of your agent? 2.171.1
OS of the machine running the agent? Windows
dev.azure.com
PR #2855 (Add a warning message to Download Pipeline Artifact task #2855) introduced a warning when not using the Publish Build articfact as it was intended to do. The warning is
`
`
This was added to the Developer Community here https://developercommunity.visualstudio.com/content/problem/1103816/need-clarification-on-warning-issued-regarding.html
The warning was observed when using the PublishCodeCoverageResultsV2 task to publish code coverage results. Tested with the publish test results in isolation as well to check if that caused the warning but that task was ok.
See warning above
Thank Gordon,
For context I am using PublishPipelineArtifact in Job1 which is an Azure Agent, and then DownloadPipelineArtifact in Job2 on an OnPremise agent.
Since this change I now am getting this warning.
What was the intended purpose of the warning?
I am also confused as the message from the MSFT is
Pipeline artifacts are the next generation of build artifacts and are the recommended way to work with artifacts.
If so why the warning if I am using the recommended tasks?
Yup. Same issue here.
Still getting this warning even though I've switched to the newer tasks for both uploads and downloads. My builds are using windows-2019 and ubuntu 18.04 hosted agents.
The docs are clear but the warnings are annoying.
Looks like the PublishCodeCoverageResults@1 task is the culprit. So if you used the PublishCodeCoverageResults@1 task before the DownloadPipelineArtifact@2 and don't specify the artifactName when downloading artifacts, it attempts to download files from the published coverage results matching the globbing pattern.
Specifying the artifactName seems to work for me.
- task: DownloadPipelineArtifact@2
displayName: 'Download Artifacts'
inputs:
buildType: 'current'
artifactName: '$(artifactName)'
itemPattern: '**'
targetPath: "$(Build.ArtifactStagingDirectory)"
Most helpful comment
Thank Gordon,
For context I am using PublishPipelineArtifact in Job1 which is an Azure Agent, and then DownloadPipelineArtifact in Job2 on an OnPremise agent.
Since this change I now am getting this warning.
What was the intended purpose of the warning?
I am also confused as the message from the MSFT is
If so why the warning if I am using the recommended tasks?