azure-pipelines-tasks: Publish code coverage error when using Hosted Ubuntu 1604

Environment

  • Hosted Agent: Hosted Ubuntu 1604

Issue Description

Task: Publish Code Coverage Results When I saw the plan about Hosted Linux Preview that will remove from Azure Pipelines on December 1, 2018.​ I change all my build pipeline agent to Hosted Ubuntu 1604 but “Publish code coverage” task not publishing code coverage report. While code coverage report publish success when using Hosted Linux Preview. Below is the behavior I test with same commit, same build pipeline, same task on Hosted Linux Preview and Hosted Ubuntu 1604.

Expected Behavior

  • No warning on log
  • Publish success like when using Hosted Linux Preview like below, linux

screenshot from 2018-11-02 10-51-06

Actual Behavior

  • Warning on task ##[warning]Error occurred while publishing code coverage files. Error: Access to the path '/home/vsts/work/1/s/coverage/summary1818' is denied.
  • Code coverage result not published

ubuntu screenshot from 2018-11-02 11-17-12 screenshot from 2018-11-02 11-03-49

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (3 by maintainers)

Most upvoted comments

I’ve hit this today:

Failed to parse result files: System.UnauthorizedAccessException: Access to the path ‘/home/vsts/work/1/s/test-cucumber.xml’ is denied.

- bash: bundle exec cucumber --format progress --format junit --out test-cucumber.xml
  displayName: Running cucumber specs
- task: PublishTestResults@2
  condition: succeededOrFailed()
  inputs:
    testResultsFiles: '**/test-*.xml'
    testRunTitle: 'Cucumber tests'

This is using ubuntu-latest.

None of the chmod or mkdir workaround posted here or in related issues is working for me. My complete project including azure-pipeline.yml is here: https://github.com/ardalis/Specification/tree/ardalis/integrationtests

@madhurig is this supposed to be fixed now? Thanks for any assistance.