mclay / azure-pipeline-allure-report

Other
5 stars 4 forks source link

Permission Denied Error when Publishing Allure Report #4

Closed kamilpajak closed 1 year ago

kamilpajak commented 1 year ago

We are encountering a "Permission Denied" error in our Azure Pipeline when we try to publish the Allure Report. The issue is specific to the access attempt to the $(Build.ArtifactStagingDirectory)/allureReport path, as seen in the Azure Pipeline logs below:

Starting: Publish Allure Report
==============================================================================
Task         : Publish Allure Report
Description  : Publish Allure Report
Version      : 1.0.21
Author       : 
Help         : Replace with markdown to show in help
==============================================================================
inline allureReport/app.js
inline allureReport/data/behaviors.json
inline allureReport/data/categories.json
inline allureReport/data/packages.json
inline allureReport/data/suites.json
inline allureReport/data/test-cases/297b4fa6521d24fd.json
inline allureReport/data/test-cases/da33434d6e0888ad.json
inline allureReport/data/test-cases/e1aa67d858214cec.json
inline allureReport/data/timeline.json
inline allureReport/export/influxDbData.txt
inline allureReport/export/mail.html
inline allureReport/export/prometheusData.txt
inline allureReport/favicon.ico
inline allureReport/history/categories-trend.json
inline allureReport/history/duration-trend.json
inline allureReport/history/history-trend.json
inline allureReport/history/history.json
inline allureReport/history/retry-trend.json
inline allureReport/index.html
inline allureReport/plugins/behaviors/index.js
inline allureReport/plugins/packages/index.js
inline allureReport/plugins/screen-diff/index.js
inline allureReport/plugins/screen-diff/styles.css
inline allureReport/styles.css
inline allureReport/widgets/behaviors.json
inline allureReport/widgets/categories-trend.json
inline allureReport/widgets/categories.json
inline allureReport/widgets/duration-trend.json
inline allureReport/widgets/duration.json
inline allureReport/widgets/environment.json
inline allureReport/widgets/executors.json
inline allureReport/widgets/history-trend.json
inline allureReport/widgets/launch.json
inline allureReport/widgets/retry-trend.json
inline allureReport/widgets/severity.json
inline allureReport/widgets/status-chart.json
inline allureReport/widgets/suites.json
inline allureReport/widgets/summary.json
##[warning]EACCES: permission denied, open '/home/vsts/work/1/a/allureReport/sinon-9.2.4.js'
Finishing: Publish Allure Report

The Allure Report publishing task is defined in our YAML steps:

steps:
  - script: |
      tree $(Build.ArtifactStagingDirectory)
    displayName: "List Build.ArtifactStagingDirectory contents after container execution"
    condition: succeededOrFailed()

  - task: PublishAllureReport@1
    inputs:
      reportDir: '$(Build.ArtifactStagingDirectory)/allureReport'
    displayName: 'Publish Allure Report'
    condition: succeededOrFailed()

The error message suggests that this might be a permissions issue. However, we have not been able to verify this or resolve it so far.

Any guidance or assistance on how we can resolve this issue would be highly appreciated.

Thank you for your help.

TGutorova commented 11 months ago

Hi, how did you solve this problem? We have the same issue. Thanks

TGutorova commented 11 months ago

Solved. It's need to add rw permissions (sudo chmod) for report directory.