Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependency-check-build-task@6 format ALL ignored when excludePath present (and only html report published) #133

Open
VladimirLevchuk opened this issue Oct 23, 2023 · 0 comments

Comments

@VladimirLevchuk
Copy link

VladimirLevchuk commented Oct 23, 2023

Hi,

I'm trying to exclude _legacy folder from the dependency check, my yaml is:

trigger:
  branches:
    include:
      - main
      - feature/*
      - hotfix/*
      - release/*

pool:
  vmImage: 'windows-latest'

steps:
- task: dependency-check-build-task@6
  inputs:
    projectName: myProject
    scanPath: '**/*.csproj'
    format: ALL
    reportsDirectory: dependency-check
    suppressionPath: 'build/dependency-check.known.xml'               
    excludePath: '_legacy/'    
- task: PublishTestResults@2
  inputs:
    testResultsFormat: JUnit
    testResultsFiles: dependency-check/*junit.xml
    testRunTitle: 'Dependency check'
    failTaskOnFailedTests: true

and ot outputs only 1 report: D:\\a\\1\\s\\dependency-check\\dependency-check-report.html
I also tried to set format to JUnit - result is the same.
The previous version without exclude path worked fine:

pool:
  vmImage: 'windows-latest'

steps:
- task: dependency-check-build-task@6
  inputs:
    projectName: myProject
    scanPath: '**/*.csproj'
    format: ALL
    reportsDirectory: dependency-check
    suppressionPath: 'build/dependency-check.known.xml'               
- task: PublishTestResults@2
  inputs:
    testResultsFormat: ALL
    testResultsFiles: dependency-check/*junit.xml
    testRunTitle: 'Dependency check'
    failTaskOnFailedTests: true

my folders structure:

  • (root)
    • _legacy
    • build
      • dependency-check.yml
      • dependency-check.known.xml
    • SubProject-1
    • SubProject-2
    • root-solution.sln

updated: fixed format in the second (working) yaml sample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant