3

I am using cobertura as I need it for report files to publish, and it seems to use a different coverage strategy from the default coverage options so I can't compare the coverages from different reports. Because I use cobertura, it produces a report file that I don't want showing up as an artifact when the pipeline runs in my target branch (I do use it for PRs). I just want the percentage posted to the build. How can I get that without the report being published as an artifact?

I have this problem, essentially: Azure Devops Code Coverage falsly recognised as artifact

However, the solution is not applicable to me because when I select my repository and build artifact for a release, it just tells me that "Code Coverage" and "drop" were the last two artifacts to be produced by my build. I can't set a filter or choose one specific folder.

user15716642
  • 171
  • 1
  • 12
  • Just a note that I am also having the issue with phpunit - I output cobertura since Azure only recognizes Jacoco and Cobertura, and when doing so, it publishes these files that I do not want.. I just want the coverage percentage to be set. – user15716642 Aug 24 '22 at 18:12

1 Answers1

1

I think you could use the Azure DevOps logging commands and add the generated file as attachment?

Publish code coverage using .coverage file?

https://learn.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?view=azure-devops&tabs=bash

JukkaK
  • 1,105
  • 5
  • 15
  • This doesn't answer my question, unfortunately. .coverage files are published by default with no work or extra steps. – user15716642 Sep 01 '22 at 18:10