You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-07-05 00:59:01 +02:00
68 lines
1.5 KiB
Markdown
68 lines
1.5 KiB
Markdown
![]() |
# ${docGenStepName}
|
||
|
|
||
|
## ${docGenDescription}
|
||
|
|
||
|
The SAP Alert Notification service for SAP BTP allows users to define
|
||
|
certain delivery channels, for example, e-mail or triggering of HTTP
|
||
|
requests, to receive notifications from pipeline events.
|
||
|
|
||
|
## Prerequisites
|
||
|
|
||
|
A service-key credential from the alert notification service.
|
||
|
|
||
|
## ${docGenParameters}
|
||
|
|
||
|
## ${docGenConfiguration}
|
||
|
|
||
|
## ${docJenkinsPluginDependencies}
|
||
|
|
||
|
## Example
|
||
|
|
||
|
Example configuration for the use in a `Jenkinsfile`.
|
||
|
|
||
|
```groovy
|
||
|
ansSendEvent(
|
||
|
script: this,
|
||
|
ansServiceKeyCredentialsId: "myANSCredential",
|
||
|
eventType: "errorEvent",
|
||
|
severity: "ERROR",
|
||
|
category: "EXCEPTION",
|
||
|
subject: "Something went wrong",
|
||
|
body: "The details of what went wrong",
|
||
|
priority: 3,
|
||
|
tags: [
|
||
|
myTag: "myValue",
|
||
|
yourTag: "yourValue"
|
||
|
],
|
||
|
resourceName: "Test Pipeline",
|
||
|
resourceType: "My Pipeline",
|
||
|
resourceInstance: "myPipeline",
|
||
|
resourceTags: [
|
||
|
myResourceTag: "a value"
|
||
|
]
|
||
|
)
|
||
|
```
|
||
|
|
||
|
Example for the use in a YAML configuration file (such as `.pipeline/config.yaml`).
|
||
|
|
||
|
```yaml
|
||
|
steps:
|
||
|
<...>
|
||
|
ansSendEvent:
|
||
|
ansServiceKeyCredentialsId: "myANSCredential",
|
||
|
eventType: "errorEvent",
|
||
|
severity: "ERROR",
|
||
|
category: "EXCEPTION",
|
||
|
subject: "Something went wrong",
|
||
|
body: "The details of what went wrong",
|
||
|
priority: 3,
|
||
|
tags:
|
||
|
myTag: "myValue",
|
||
|
yourTag: "yourValue",
|
||
|
resourceName: "Test Pipeline",
|
||
|
resourceType: "My Pipeline",
|
||
|
resourceInstance: "myPipeline",
|
||
|
resourceTags:
|
||
|
myResourceTag: "a value"
|
||
|
```
|