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