6

I'm trying to publish junit.xml test results in an Azure DevOps pipeline but the task isn't finding it.

What would the path be from $(System.DefaultWorkingDirectory)

to the generated junit.xml after running an npm test task?

Solution Explorer

riQQ
  • 9,878
  • 7
  • 49
  • 66
davy
  • 4,474
  • 10
  • 48
  • 71

2 Answers2

10

you could use this glob pattern to scan all the folders: **/junit.xml.

that being said System.DefaultWorkingDirectory is the local path on the agent where your source code files are downloaded. so, root of the repo, effectively.

4c74356b41
  • 69,186
  • 6
  • 100
  • 141
  • 2
    Typically after about an hour I figured it out just before the answer: $(System.DefaultWorkingDirectory)/InspectionWeb/ClientApp/src – davy Mar 15 '19 at 19:24
  • 1
    Thanks for the glob pattern too :) – davy Mar 15 '19 at 19:25
0

I personally find these commands very useful when working out where in the hierarchy you are:

    - powershell: "Write-Output 'System.DefaultWorkingDirectory: $(System.DefaultWorkingDirectory)'"
    - script: dir $(System.DefaultWorkingDirectory)
    - script: dir $(System.DefaultWorkingDirectory)/xxx/yyy

Then you can inspect these tasks and see what the output is...

Rodney
  • 5,417
  • 7
  • 54
  • 98