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

jenkins emailext parsing as oneline

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • email-ext-plugin
    • None

      hi I have this configurartion of emailext in the jenkinsfile

       
      emailext body: emailContent(env.global_exception),
                          subject: "[Jenkins] ${jobName}",
                          to: "${mailRecipients}",
       
      for the email ext plugin and this call that called emailContent.grooby
       
      def call(global_exception) {
        return '''
        -------------------------------------------------------------------------------
        Build ${ENV,var="JOB_NAME"} #${BUILD_NUMBER} ${BUILD_STATUS}
        URL: ${BUILD_URL}
        -------------------------------------------------------------------------------
        Changes:
        ${CHANGES}
        -------------------------------------------------------------------------------
        Error:
        '''+
        global_exception + "
      n" +
        '''
        -------------------------------------------------------------------------------
        Failed Tests:
        ${FAILED_TESTS,maxTests=500,showMessage=false,showStack=false}
        -------------------------------------------------------------------------------
        For complete test report and logs see https://nightlies.apache.org/cassandra/${JOB_NAME}/${BUILD_NUMBER}/
        '''
      }
      I am trying to paste the call in the pipeline and it parsing it correctly
       
       
      but in the mail that jenkins create I get one line of this message 

       

            Unassigned Unassigned
            yuval123 yuval
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: