1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-11-06 09:09:19 +02:00

Bug Fix : Detect doesnt map the error category in case of License violations (#3118)

* fail step for license violation

* add toolrecord creation

* toolrecord generation in all cases

* handle exitcode 0 error mapping

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
This commit is contained in:
Giridhar Shenoy
2021-09-21 22:36:12 +02:00
committed by GitHub
parent 56be54c504
commit 3cce9d9dd6

View File

@@ -189,6 +189,10 @@ func runDetect(config detectExecuteScanOptions, utils detectUtils, influx *detec
// Get proper error category
func mapErrorCategory(exitCodeKey int) {
switch exitCodeKey {
case 0:
//In case detect exits successfully, we rely on the function 'postScanChecksAndReporting' to determine the error category
//hence this method doesnt need to set an error category or go to 'default' case
break
case 1:
log.SetErrorCategory(log.ErrorInfrastructure)
case 2: