1
votes

When using azure devops with following pipeline task:

      - task: PublishCodeCoverageResults@1
        inputs:
          codeCoverageTool: 'cobertura'
          summaryFileLocation: $(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml
        displayName: 'publish coverage data'

This publishes the code coverage data as artifact, resulting in unneccessary downloads in the release pipelines of coverage data.

How can I either skip the download of specific artifacts in the release pipeline?

Or how can I tell pipelines, that I want to see the coverage data, but those are not artifacts to release?

2

2 Answers

1
votes

If you use release pipelines you can define on job details which artifacts you want to download:

enter image description here

0
votes

If you want to ensure that you maintain full control over what is published, you can use a combination of the two tasks "Copy Files" and "Publish Build Artifacts":

  1. "Copy Files" allows you to copy specific files (wildcards are allowed) to a separate folder of your choosing.
    https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/copy-files?view=azure-devops
  2. "Publish Build Artifacts" publishes the files in the folder you specify - in the current scenario this would be the folder used as target in the "Copy Files" task.
    https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/publish-build-artifacts?view=azure-devops