-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Jenkins 2.19.3, pipeline-model-definition-plugin 0.6
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.
- links to