mirror of
https://github.com/SAP/jenkins-library.git
synced 2026-06-19 22:58:55 +02:00
Avoid unwanted behavior when using resilience options (#650)
Certain steps should always fail, even though resilience option `failOnError=false` is used. * Docker execution typically happens in another step. We should not hide errors here but rather handle their resilience in the step which uses `dockerExecute` and `dockerExecuteOnKubernetes`. * Wrapper steps like `pipelineExecute`, `pipelineRestartSteps` should not hide errors. If an error occured this has to be considered as **intentional** and not hidden accidentially in case resilience option is switched on.
This commit is contained in:
@@ -110,7 +110,7 @@ import groovy.transform.Field
|
||||
*/
|
||||
@GenerateDocumentation
|
||||
void call(Map parameters = [:], body) {
|
||||
handlePipelineStepErrors(stepName: STEP_NAME, stepParameters: parameters) {
|
||||
handlePipelineStepErrors(stepName: STEP_NAME, stepParameters: parameters, failOnError: true) {
|
||||
|
||||
final script = checkScript(this, parameters) ?: this
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ import hudson.AbortException
|
||||
*/
|
||||
@GenerateDocumentation
|
||||
void call(Map parameters = [:], body) {
|
||||
handlePipelineStepErrors(stepName: STEP_NAME, stepParameters: parameters) {
|
||||
handlePipelineStepErrors(stepName: STEP_NAME, stepParameters: parameters, failOnError: true) {
|
||||
|
||||
final script = checkScript(this, parameters) ?: this
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ void call(Map parameters = [:]) {
|
||||
|
||||
def path
|
||||
|
||||
handlePipelineStepErrors (stepName: 'pipelineExecute', stepParameters: parameters) {
|
||||
handlePipelineStepErrors (stepName: 'pipelineExecute', stepParameters: parameters, failOnError: true) {
|
||||
|
||||
def utils = new Utils()
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import groovy.transform.Field
|
||||
@Field Set PARAMETER_KEYS = STEP_CONFIG_KEYS
|
||||
|
||||
void call(Map parameters = [:], body) {
|
||||
handlePipelineStepErrors (stepName: STEP_NAME, stepParameters: parameters) {
|
||||
handlePipelineStepErrors (stepName: STEP_NAME, stepParameters: parameters, failOnError: true) {
|
||||
def script = checkScript(this, parameters) ?: this
|
||||
def jenkinsUtils = parameters.jenkinsUtilsStub ?: new JenkinsUtils()
|
||||
// load default & individual configuration
|
||||
|
||||
Reference in New Issue
Block a user