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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: core, mailer-plugin
    • Labels:
      None
    • Environment:
      using jenkinsci/blue ocean docker image.
      docker run jenkinsci/blueocean:latest --version = 2.89.4
       os: ubuntu 16.04
    • Similar Issues:

      Description

      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?

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            iko IKO BH
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: