Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
Running following code:
pipeline { agent label: '' stages { stage ('Build') { steps{ sh 'echo1 "Building"' } } stage ('Test') { steps{ sh 'echo "Test"' } } stage ('Deploy') { steps{ sh 'echo "Building"' } } } }
Only step in Build stage fails, declarative plugin adds extra print step to print there was failure however this step is not marked as error resulting in failure to mark the stage as error using StatusAndTiming.computeChunkStatus() api, which reports status of stage based on last step. That is if last sep was success, that means all is well. svanoort, this also shows up 'Build' stage as success in stage view plugin.
Intent of declarative plugin is to report error that running that stage failed, this extra step it injects should have step.getError() return an error, that is FlowNode.getError().getError() returns a well known throwable to identify stage failed to run, StageExecutionFailure or something like that? Otherwise it defeats the purpose of marking stage as failure using StatusAndTiming.computeChunkStatus() API.
Attachments
Issue Links
- blocks
-
JENKINS-39463 Integrate pipeline-model-definition 0.6
-
- Resolved
-
- links to
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue blocks |
Description |
Running following code: {code:java} pipeline { agent label: '' stages { stage ('Build') { steps{ sh 'echo1 "Building"' } } stage ('Test') { steps{ sh 'echo "Test"' } } stage ('Deploy') { steps{ sh 'echo "Building"' } } } } {code} Only step in Build stage fails, declarative plugin adds extra print step to print there was failure however this step is not marked as error resulting in failure to mark the stage as error using StatusAndTiming.computeChunkStatus() api, which reports status of stage based on last step. That is if last sep was success, that means all is well. [~svanoort], this also shows up 'Build' stage as success in stage view plugin. Intent of declarative plugin is to report error that running that stage failed, this extra step it injects should have step.getError() return an error object otherwise it defeats the purpose. |
Running following code: {code:java} pipeline { agent label: '' stages { stage ('Build') { steps{ sh 'echo1 "Building"' } } stage ('Test') { steps{ sh 'echo "Test"' } } stage ('Deploy') { steps{ sh 'echo "Building"' } } } } {code} Only step in Build stage fails, declarative plugin adds extra print step to print there was failure however this step is not marked as error resulting in failure to mark the stage as error using StatusAndTiming.computeChunkStatus() api, which reports status of stage based on last step. That is if last sep was success, that means all is well. [~svanoort], this also shows up 'Build' stage as success in stage view plugin. Intent of declarative plugin is to report error that running that stage failed, this extra step it injects should have step.getError() return an error, that is FlowNode.getError().getError() returns a well known throwable to identify stage failed to run, StageExecutionFailure or something like that? Otherwise it defeats the purpose of marking stage as failure using StatusAndTiming.computeChunkStatus() API. |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | In Review [ 10005 ] |
Remote Link | This issue links to "PR #51 (Web Link)" [ 15038 ] |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10005 ] | Resolved [ 5 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |