jenkins-library
jenkins-library copied to clipboard
Fix influx counter for whitesource
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
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
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.
Pull request got stale and no further activity happened. It has automatically been closed. Please re-open in case you still consider it relevant.