2019-03-29 14:12:28 +02:00
|
|
|
# ${docGenStepName}
|
2017-07-11 15:12:03 +02:00
|
|
|
|
2019-03-29 14:12:28 +02:00
|
|
|
## ${docGenDescription}
|
2017-07-11 15:12:03 +02:00
|
|
|
|
|
|
|
## Prerequisites
|
2018-11-06 14:50:09 +02:00
|
|
|
|
2017-07-11 15:12:03 +02:00
|
|
|
none
|
|
|
|
|
|
|
|
## Example
|
2018-11-06 14:50:09 +02:00
|
|
|
|
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}"
|
|
|
|
}
|
|
|
|
```
|
2019-04-03 13:16:38 +02:00
|
|
|
|
|
|
|
## Example console output
|
|
|
|
|
|
|
|
If `echoDetails` is set to true the following information will be output to the console:
|
|
|
|
|
|
|
|
1. Step beginning: `--- Begin library step: ${stepName}.groovy ---`
|
|
|
|
1. Step end: `--- End library step: ${stepName}.groovy ---`
|
|
|
|
1. Step errors:
|
|
|
|
|
|
|
|
```log
|
|
|
|
----------------------------------------------------------
|
|
|
|
--- An error occurred in the library step: ${stepName}
|
|
|
|
----------------------------------------------------------
|
|
|
|
The following parameters were available to the step:
|
|
|
|
***
|
|
|
|
${stepParameters}
|
|
|
|
***
|
|
|
|
The error was:
|
|
|
|
***
|
|
|
|
${err}
|
|
|
|
***
|
|
|
|
Further information:
|
|
|
|
* Documentation of step ${stepName}: .../${stepName}/
|
|
|
|
* Pipeline documentation: https://...
|
|
|
|
* GitHub repository for pipeline steps: https://...
|
|
|
|
----------------------------------------------------------
|
|
|
|
```
|
2019-04-04 08:38:54 +02:00
|
|
|
|
|
|
|
## ${docGenParameters}
|
|
|
|
|
|
|
|
## ${docGenConfiguration}
|