dependency-check / azuredevops

Dependency Check Azure DevOps Extension
Apache License 2.0
47 stars 25 forks source link

Cannot customize the output directory for test result. #57

Closed barozi closed 3 years ago

barozi commented 4 years ago

I have found that whatever will be configured in task definition for OWASP DC in _outputDirectory_ parameter it is not taken into consideration when test results are created. The results are always created in D:\a\1\TestResults\dependency-check.

After that I am unable to reach this directory when trying to Publish the results with JUnit publisher. Configuration of Publish task is like this:searchFolder: '$(System.DefaultWorkingDirectory)\TestResults\dependency-check\' but it is transformed to path like this ##[debug]adjustedPattern: 'D:\a\1\s\TestResults\dependency-check\*junit.xml'

Is the outputdirectory paramater somehow ingnored?

alaincroisetiere commented 3 years ago

PR #58 seems to fix this issue. Note that $(Build.SourcesDirectory) cannot be configured as output. If the reports directory is blank, Azure DevOps API always send the value of $(Build.SourcesDirectory) as default value and the Task take the value of $(Common.TestResultsDirectory). Check this line.