[JIRA] (JENKINS-40226) Dockerfile build failures do not trigger failure post section

1 view
Skip to first unread message

gavin.llewellyn@blackboard.com (JIRA)

unread,
Dec 5, 2016, 12:10:01 PM12/5/16
to jenkinsc...@googlegroups.com
Gavin Llewellyn created an issue
 
Jenkins / Bug JENKINS-40226
Dockerfile build failures do not trigger failure post section
Issue Type: Bug Bug
Assignee: Andrew Bayer
Components: pipeline-model-definition-plugin
Created: 2016/Dec/05 5:09 PM
Environment: Jenkins 2.19.3, pipeline-model-definition-plugin 0.6
Priority: Minor Minor
Reporter: Gavin Llewellyn

I am using the new Dockerfile support added in JENKINS-39216. I also have a "post" section within "pipeline" in my Jenkinsfile set up to send notifications of the build result:

pipeline {
  // Build environment is defined by the Dockerfile
  agent dockerfile:true
  stages {
    stage('package') {
      steps {
        // Do build
      }
    }
  }
  post {
    success {
      hipchatSend color: "GREEN", message: "SUCCESS: <a href=\"${currentBuild.absoluteUrl}\">${currentBuild.fullDisplayName}</a>"
    }
    failure {
      hipchatSend color: "RED", message: "FAILURE: <a href=\"${currentBuild.absoluteUrl}\">${currentBuild.fullDisplayName}</a>", notify: true
    }
    unstable {
      hipchatSend color: "YELLOW", message: "UNSTABLE: <a href=\"${currentBuild.absoluteUrl}\">${currentBuild.fullDisplayName}</a>", notify: true
    }
  }
}

However, if a failure occurs during the Dockerfile image build (e.g. a non-zero return code from a RUN step), the build is marked as failed but no notification is sent.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

andrew.bayer@gmail.com (JIRA)

unread,
Dec 8, 2016, 3:51:02 PM12/8/16
to jenkinsc...@googlegroups.com
Andrew Bayer started work on Bug JENKINS-40226
 
Change By: Andrew Bayer
Status: Open In Progress

andrew.bayer@gmail.com (JIRA)

unread,
Dec 8, 2016, 5:11:02 PM12/8/16
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Dec 8, 2016, 5:11:03 PM12/8/16
to jenkinsc...@googlegroups.com

scm_issue_link@java.net (JIRA)

unread,
Dec 12, 2016, 11:19:01 AM12/12/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Andrew Bayer
Path:
pipeline-model-definition/pom.xml
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfileScript.groovy
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineScript.groovy
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/LabelScript.groovy
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java
pipeline-model-definition/src/test/resources/failureBeforeStages.groovy
pipeline-model-definition/src/test/resources/skippedStagesForFailure.groovy
http://jenkins-ci.org/commit/pipeline-model-definition-plugin/3cdc1032649e64244be3f3ebee7a1280188e0009
Log:
[FIXED JENKINS-40226] Make sure non-within-stage failures are real.

More notably, make sure we still end up doing a `post` for them if
needed and that the build status is correct at that time.

andrew.bayer@gmail.com (JIRA)

unread,
Dec 12, 2016, 11:24:03 AM12/12/16
to jenkinsc...@googlegroups.com

scm_issue_link@java.net (JIRA)

unread,
Dec 14, 2016, 7:03:03 AM12/14/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Andrew Bayer
Path:
pipeline-model-definition/pom.xml
pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineFromDockerfileScript.groovy
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/DockerPipelineScript.groovy
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/agent/impl/LabelScript.groovy
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java
pipeline-model-definition/src/test/resources/failureBeforeStages.groovy
pipeline-model-definition/src/test/resources/skippedStagesForFailure.groovy

[FIXED JENKINS-40226] Make sure non-within-stage failures are real.

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:25:23 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