1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-07-15 01:34:38 +02:00

Added hook configuration; added sentry hook and tests (#1497)

* Added hook configuration; added sentry hook and tests
* steps generated by step framework
* added comments and renamed correlationID
* formatted comment on NewSentryHook method
* fix generator step tests
This commit is contained in:
lndrschlz
2020-05-05 08:36:24 +02:00
committed by GitHub
parent e153e8f798
commit 39e30ff1b4
31 changed files with 461 additions and 27 deletions

View File

@ -45,6 +45,12 @@ func NpmExecuteScriptsCommand() *cobra.Command {
if err != nil {
return err
}
if len(GeneralConfig.HookConfig.SentryConfig.Dsn) > 0 {
sentryHook := log.NewSentryHook(GeneralConfig.HookConfig.SentryConfig.Dsn, GeneralConfig.CorrelationID)
log.RegisterHook(&sentryHook)
}
return nil
},
Run: func(cmd *cobra.Command, args []string) {