1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-16 11:09:33 +02:00
sap-jenkins-library/documentation/docs/steps/handlePipelineStepErrors.md

29 lines
434 B
Markdown
Raw Normal View History

# ${docGenStepName}
2017-07-11 15:12:03 +02:00
## ${docGenDescription}
2017-07-11 15:12:03 +02:00
## Prerequisites
2017-07-11 15:12:03 +02:00
none
## ${docGenParameters}
2017-07-11 15:12:03 +02:00
2018-03-06 14:43:53 +02:00
## Step configuration
2018-03-06 14:43:53 +02:00
none
2017-07-11 15:12:03 +02:00
## Exceptions
2017-07-11 15:12:03 +02:00
none
## Example
2017-07-11 15:12:03 +02:00
```groovy
handlePipelineStepErrors (stepName: 'executeHealthCheck', stepParameters: parameters) {
def url = new Utils().getMandatoryParameter(parameters, 'url', null)
def statusCode = curl(url)
if (statusCode != '200')
error "Health Check failed: ${statusCode}"
}
```