Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Component/s: pipeline-model-definition-plugin
-
Labels:None
-
Environment:Jenkins server 2.98, Pipeline plugin 2.5, Pipeline step API 2.14
-
Similar Issues:
Description
In a pipeline script I have the following post handler logic.
post { always { junit 'results/*.xml' } changed { emailext body: '$DEFAULT_CONTENT', subject: '$DEFAULT_SUBJECT', to: 'email@domain.com' } }
What used to happen is that emails would only be sent if the state changed. So if the build results were as follows
- FAILED
- UNSTABLE
- UNSTABLE
- UNSTABLE
- FAILED
- UNSTABLE
- FAILED
- UNSTABLE
- UNSTABLE
Then email would only be sent on the state change from UNSTABLE->FAILED or FAILED->UNSTABLE. Emails would not be sent when the state was UNSTABLE->UNSTABLE.
However our Jenkins server was updated over Christmas and as a result I am seeing an email being sent regardless of the state remaining the same. I could work around this by using something similar to
if (currentBuild.currentResult.toString() != currentBuild.getPreviousBuild.getResult().toString()) { // email }
However the previous behaviour was what I was expecting to see. Changes in the pipeline plugins seem to be
Plugin | Previous version | New version |
---|---|---|
Pipeline: API | 2.23 | 2.24 |
Pipeline: Basic Steps | 2.5 | 2.6 |
Pipeline: Build Step | 2.5.1 | 2.6 |
Pipeline: Declarative | 1.2.2 | 1.2.5 |
Pipeline: Declarative Extension Points API | 1.2.2 | 1.2.5 |
Pipeline: Groovy | 2.41 | 2.42 |
Pipeline: Nodes and Processes | 2.11 | 2.17 |
Pipeline: Shared Groovy Libraries | 2.8 | 2.9 |
Pipeline: Stage Step | 2.2 | 2.3 |
Pipeline: Step API | 2.13 | 2.14 |
Attachments
Issue Links
- links to
Activity
Field | Original Value | New Value |
---|---|---|
Component/s | pipeline-model-definition-plugin [ 21706 ] | |
Component/s | pipeline [ 21692 ] |
Assignee | Andrew Bayer [ abayer ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | In Review [ 10005 ] |
Remote Link | This issue links to "PR #242 (Web Link)" [ 19974 ] |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10005 ] | Resolved [ 5 ] |
Comment |
[ I am using Jenkins version: 2.135 In case of repeated FAILURE results, I enter the changed block again and again. I couldn't verify when the issue was introduced again after the fix. ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |