Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-49981

GUI indicates post failure mail step fails, while mail is being sent.


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core, mailer-plugin
    • None
    • using jenkinsci/blue ocean docker image.
      docker run jenkinsci/blueocean:latest --version = 2.89.4
       os: ubuntu 16.04

      Using the following in my Jenkinsfile:

          stage('Test') {
            steps {
              sh 'pytest --junitxml result.xml testing/'
            post {
              failure {
                mail(to: 'user@example.com', subject: "Failed Pipeline : ${currentBuild.fullDisplayName}", body: "Something is wrong with ${env.BUILD_URL}")
              always {
                junit 'result.xml'

      When one of my test fails, I get the following indication:

      But the mail is being sent successfully.

      When moving the 'post' section to be under 'pipline' section, or when deleting the 'always' block,leaving only the 'failure' block, Mail section is green.

      You think the order of block execution within the 'post' section has an impact on the GUI presented?

      As I mentioned, the Mail step doesn't actually fails, it actually send an email as it should. But GUI indicates a failure.


      Any thoughts?

            Unassigned Unassigned
            iko IKO BH
            0 Vote for this issue
            1 Start watching this issue