1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
sap-jenkins-library/pkg
Oliver Nocon eafe383d54
Add error category parsing to cmd execution (#1703)
* Add error category parsing to cmd execution

It is now possible to define `ErrorCategoryMapping` as a `map[string][]string` on a `Command`.
The format contains the category as key which has a list of error patterns assigned.
Example:

```
cmd := Command{
  ErrorCategoryMapping: map[string][]string
    "build": {"build failed"},
    "compliance": {"vulnerabilities found", "outdated components found"},
    "test": {"some tests failed"},
  },
}
```

Setting this map triggers console log parsing when executing a command.
If a match is found the error category is stored and
it will automatically be added to the `errorDetails.json`.

* clean up go.mod

* fix test

* fix test

* Update DEVELOPMENT.md

* fix tests

* address long console content without line breaks

* scan condition update

* fix test

* add missing comment for exported function

* Update pkg/command/command.go

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-06-24 10:04:05 +02:00
..
checkmarx Fortify implementation in golang (#1428) 2020-05-25 19:48:59 +02:00
cloudfoundry Introduce interface for manifest (#1676) 2020-06-17 15:19:40 +02:00
command Add error category parsing to cmd execution (#1703) 2020-06-24 10:04:05 +02:00
config Consider stage config from custom defaults (#1670) 2020-06-16 09:06:37 +02:00
docker Docker functionality fix interface (#1156) 2020-02-06 11:14:11 +01:00
fortify Fortify: Using mvn to auto-resolve classpath needs additional params (#1607) 2020-05-29 15:42:35 +02:00
generator Add error category parsing to cmd execution (#1703) 2020-06-24 10:04:05 +02:00
github Update githubPublishRelease 2019-11-04 16:07:30 +01:00
http Increase default transport timeout to 3 mins (#1648) 2020-06-10 11:14:55 +02:00
log Add error category parsing to cmd execution (#1703) 2020-06-24 10:04:05 +02:00
maven Avoid need of cd to install maven modules (#1677) 2020-06-17 19:08:43 +02:00
mock Refactor pkg/npm and npmExecuteScripts (#1684) 2020-06-18 17:30:17 +02:00
nexus Extend nexusUpload to also handle npm (#1379) 2020-04-11 12:56:44 +02:00
npm Refactor pkg/npm and npmExecuteScripts (#1684) 2020-06-18 17:30:17 +02:00
piperenv fix: improve stepResults handling (#1425) 2020-04-20 16:18:49 +02:00
piperutils No parallel test exec for file tests (#1675) 2020-06-16 14:50:11 +02:00
protecode fix(protecode): handle api request issues (#1508) 2020-05-05 16:26:41 +02:00
sonar feat(sonar): extract sonar project link to report JSON (#1390) 2020-04-21 15:45:52 +02:00
telemetry http.go: Set fine-grained timeouts (#1257) 2020-03-23 15:02:22 +01:00
versioning Refactor maven.Evaluate() to take options (#1659) 2020-06-11 14:02:54 +02:00
whitesource Add package for whitesource (#1577) 2020-05-26 17:30:45 +02:00