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:
Oliver Nocon
2019-04-08 20:10:54 +02:00
committed by GitHub
parent 5c13a0e2a2
commit 35ced01ffa
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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