jenkins-library icon indicating copy to clipboard operation
jenkins-library copied to clipboard

Fix influx counter for whitesource

Open tlefaix opened this issue 1 year ago • 5 comments
trafficstars

Changes

In case of several projects scanned (like with mta), collectVulnsAndLibsForProject (and therefore checkProjectSecurityViolations) will be called several times (see : https://github.com/SAP/jenkins-library/blob/master/cmd/whitesourceExecuteScan.go#L657)

Current issue is that in this case, the influx metrics will only contains the results for the latest scanned project.

Change is to accumulate values from each projects instead of replacing the values.

I also amended the existing tests to validate that influx metrics contains the correct value at the end.

  • [x] Tests
  • [ ] Documentation

tlefaix avatar Oct 07 '24 12:10 tlefaix

CLA assistant check
All committers have signed the CLA.

cla-assistant[bot] avatar Oct 07 '24 12:10 cla-assistant[bot]

Thank you for your contribution! This pull request is stale because it has been open 60 days with no activity. In order to keep it open, please remove stale label or add a comment within the next 10 days. If you need a Piper team member to remove the stale label make sure to add @SAP/jenkins-library-team to your comment.

github-actions[bot] avatar Jun 23 '25 00:06 github-actions[bot]

Pull request got stale and no further activity happened. It has automatically been closed. Please re-open in case you still consider it relevant.

github-actions[bot] avatar Jul 03 '25 00:07 github-actions[bot]