Details
-
Type:
Improvement
-
Status: Closed (View Workflow)
-
Priority:
Minor
-
Resolution: Duplicate
-
Component/s: pipeline-model-definition-plugin
-
Labels:
-
Environment:We track Jenkins LTS approx 4 weeks behind.
-
Similar Issues:
Description
The post.always action should be the last action run in a stage or pipeline. At present it will run BEFORE the post.success, aborted, and failure actions which doesn't make much sense.
Example:
I want to clean the workspace at the end of a stage regardless of status, and I want to archive some files on success. The logical way to achieve this is to clean the workspace in the post.always and archive the files on post.success. This is not possible in the current plugin.
I know there are ways to get round this 'feature' but they are not exactly intuitive.
Attached a simple pipeline to demonstrate the issue.
Attachments
Issue Links
- duplicates
-
JENKINS-41519 Post stages should have well defined order
-
- Closed
-
Johan-Kees Vliek Actually it does. If you have junit in an always block this might change the status of the build.
If the always block is first then logically any failure/unstable would be executed if test fails/files are missing. But if the junit block is last in an already failing build, should it then rerun a failure block that has already been executed? These kind of scenarios needs to be thought through if the post order is changed.