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

pipeline build failed mail - missing line break

    Details

    • Similar Issues:
    • Released As:
      1.26

      Description

      when catching a build failure and sending an email via:

      catch (err) {
          node ('Client-Slave'){
              echo "Failed: ${err}"
              currentBuild.result = 'FAILURE'
              step([$class: 'Mailer', recipients: 'example@example.com, recipient2@example.com'])
          }
      }
      

      the mail is send as:

      [...]
      X-Jenkins-Job: example_pipeline
      X-Jenkins-Result: FAILURE
      
      https://jenkins.example.com/blue/organizations/jenkins/example_pipeline/detail/example_pipeline/21/------------------------------------------
      [...truncated 25 lines...]
      [...]
      

      it would be better to send it with a line break after the url, as the ----- are treated as part of the url by some mail clients:

      [...]
      X-Jenkins-Job: example_pipeline
      X-Jenkins-Result: FAILURE
      
      https://jenkins.example.com/blue/organizations/jenkins/example_pipeline/detail/example_pipeline/21/
      ------------------------------------------
      [...truncated 25 lines...]
      [...]
      

        Attachments

          Issue Links

            Activity

            Hide
            leufkes Thomas Leufkes added a comment -

            please fix this.

            Show
            leufkes Thomas Leufkes added a comment - please fix this.
            Hide
            nikomad Niko Madalinski added a comment -

            Same bug here. The generated url in mail ist broken

            Show
            nikomad Niko Madalinski added a comment - Same bug here. The generated url in mail ist broken
            Hide
            jglick Jesse Glick added a comment -

            Is this actually Pipeline-specific?

            Show
            jglick Jesse Glick added a comment - Is this actually Pipeline-specific?
            Hide
            jglick Jesse Glick added a comment -

            PR 33?

            Show
            jglick Jesse Glick added a comment - PR 33?
            Hide
            romanp Roman Pickl added a comment -

            I think it is fixed.

            Show
            romanp Roman Pickl added a comment - I think it is fixed.
            Hide
            alecharp Adrien Lecharpentier added a comment -

            Roman Pickl are you sure it's fixed? I was about to integrate the PR in mailer plugin but if you say it's not a problem anymore.. I'm perplexed now.

            Show
            alecharp Adrien Lecharpentier added a comment - Roman Pickl are you sure it's fixed? I was about to integrate the PR in mailer plugin but if you say it's not a problem anymore.. I'm perplexed now.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            I do not see changes which would have fixed that. The PR is trivial, so probably we should integrate it and move on

            Show
            oleg_nenashev Oleg Nenashev added a comment - I do not see changes which would have fixed that. The PR is trivial, so probably we should integrate it and move on

              People

              • Assignee:
                Unassigned
                Reporter:
                romanp Roman Pickl
              • Votes:
                3 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: