github.com/ouraigua/jenkins-library@v0.0.0-20231028010029-fbeaf2f3aa9b/documentation/docs/steps/ansSendEvent.md (about) 1 # ${docGenStepName} 2 3 ## ${docGenDescription} 4 5 The SAP Alert Notification service for SAP BTP allows users to define 6 certain delivery channels, for example, e-mail or triggering of HTTP 7 requests, to receive notifications from pipeline events. 8 9 ## Prerequisites 10 11 A service-key credential from the alert notification service. 12 13 ## ${docGenParameters} 14 15 ## ${docGenConfiguration} 16 17 ## ${docJenkinsPluginDependencies} 18 19 ## Example 20 21 Example configuration for the use in a `Jenkinsfile`. 22 23 ```groovy 24 ansSendEvent( 25 script: this, 26 ansServiceKeyCredentialsId: "myANSCredential", 27 eventType: "errorEvent", 28 severity: "ERROR", 29 category: "EXCEPTION", 30 subject: "Something went wrong", 31 body: "The details of what went wrong", 32 priority: 3, 33 tags: [ 34 myTag: "myValue", 35 yourTag: "yourValue" 36 ], 37 resourceName: "Test Pipeline", 38 resourceType: "My Pipeline", 39 resourceInstance: "myPipeline", 40 resourceTags: [ 41 myResourceTag: "a value" 42 ] 43 ) 44 ``` 45 46 Example for the use in a YAML configuration file (such as `.pipeline/config.yaml`). 47 48 ```yaml 49 steps: 50 <...> 51 ansSendEvent: 52 ansServiceKeyCredentialsId: "myANSCredential", 53 eventType: "errorEvent", 54 severity: "ERROR", 55 category: "EXCEPTION", 56 subject: "Something went wrong", 57 body: "The details of what went wrong", 58 priority: 3, 59 tags: 60 myTag: "myValue", 61 yourTag: "yourValue", 62 resourceName: "Test Pipeline", 63 resourceType: "My Pipeline", 64 resourceInstance: "myPipeline", 65 resourceTags: 66 myResourceTag: "a value" 67 ```