You've already forked sap-jenkins-library
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user