jenkins emailext parsing as oneline

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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 

       

            Assignee:
            Unassigned
            Reporter:
            yuval
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: