[JIRA] (JENKINS-55476) unsuccessful block is triggered for successful runs

2 views
Skip to first unread message

kutzi@gmx.de (JIRA)

unread,
Jan 9, 2019, 7:53:02 AM1/9/19
to jenkinsc...@googlegroups.com
kutzi created an issue
 
Jenkins / Bug JENKINS-55476
unsuccessful block is triggered for successful runs
Issue Type: Bug Bug
Assignee: Andrew Bayer
Components: pipeline-model-definition-plugin
Created: 2019-01-09 12:52
Environment: pipeline-model-api plugin 1.3.4
Jenkins 2.150.1
Priority: Critical Critical
Reporter: kutzi

The post-unsuccessful block of my declarative pipeline is triggered even if the build is successful!

Excerpt from my Jenkinsfile

pipeline {
  stages { ... }
  post { 
    always { ... }
    success { ... }
    unsuccessful {
      script {
        echo "Build results: ${currentBuild.result} - ${currentBuild.currentResult}"
        ...
      }
    }
  }
}
   

And I can see `Build results: SUCCESS - SUCCESS` in the pipeline output - and the other steps of the unsuccessful block executed as well, of course

  

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

dnusbaum@cloudbees.com (JIRA)

unread,
Feb 22, 2019, 4:36:02 PM2/22/19
to jenkinsc...@googlegroups.com
Devin Nusbaum assigned an issue to Devin Nusbaum
Change By: Devin Nusbaum
Assignee: Andrew Bayer Devin Nusbaum

dnusbaum@cloudbees.com (JIRA)

unread,
Feb 22, 2019, 4:36:03 PM2/22/19
to jenkinsc...@googlegroups.com
Devin Nusbaum started work on Bug JENKINS-55476
 
Change By: Devin Nusbaum
Status: Open In Progress

dnusbaum@cloudbees.com (JIRA)

unread,
Feb 22, 2019, 4:36:04 PM2/22/19
to jenkinsc...@googlegroups.com

dnusbaum@cloudbees.com (JIRA)

unread,
Feb 22, 2019, 4:36:04 PM2/22/19
to jenkinsc...@googlegroups.com
Devin Nusbaum commented on Bug JENKINS-55476
 
Re: unsuccessful block is triggered for successful runs

I noticed this as well in https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/313, (the main point of that PR is not related, I just happened to see it) and added a fix for it there. See https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/313#discussion_r259517064 specifically.

dnusbaum@cloudbees.com (JIRA)

unread,
Feb 28, 2019, 4:16:03 PM2/28/19
to jenkinsc...@googlegroups.com
Change By: Devin Nusbaum
Status: In Review Fixed but Unreleased
Resolution: Fixed

dnusbaum@cloudbees.com (JIRA)

unread,
Mar 4, 2019, 3:58:04 PM3/4/19
to jenkinsc...@googlegroups.com
 

The fix for this issue was released in version 1.3.5 of the Pipeline: Declarative Plugin.

Change By: Devin Nusbaum
Status: Fixed but Unreleased Resolved
Released As: pipeline-model-definition 1.3.5

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:24:47 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Fixed
 

Bulk closing resolved issues.

Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages