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

option to include attachment with console.txt from failed slaves

    Details

    • Similar Issues:

      Description

      1. It would be nice to have configuration checkbox in email-ext, to attach zip file with job console logs from failed slaves, like:
      failed_console.zip:
      slave1_console.txt
      slave2_console.txt
      slave3_console.txt

      Currently, the build.zip from master node is ~useless because all interesting info is at slaves and requires manual work to extract.

      2. Also, the build.zip attached in the email-ext contains file named "log", can you change it to log.txt to let "double click" open it in notepad automatically?

        Attachments

          Activity

          Hide
          slide_o_mix Alex Earl added a comment -

          I really don't have a setup that I can test this out on, so if someone wants to implement something and issue a pull request, that would also be helpful. I don't run matrix jobs at all in my company, so I just don't have what is needed to develop the feature.

          Show
          slide_o_mix Alex Earl added a comment - I really don't have a setup that I can test this out on, so if someone wants to implement something and issue a pull request, that would also be helpful. I don't run matrix jobs at all in my company, so I just don't have what is needed to develop the feature.
          Hide
          lgorman luke gorman added a comment -

          this bit of bash does the trick

          IFS=",";
          JOBS="$TRIGGERED_JOB_NAMES"
          JOBARRAY=($JOBS)
          
          for JOB in "${JOBARRAY[@]}"
          do
            echo $JOB
            NUMBER_NAME="TRIGGERED_BUILD_NUMBER_${JOB}"
            NUMBER=$(eval echo \$$NUMBER_NAME) 
            echo $NUMBER
            cp $JENKINS_HOME/jobs/$JOB/builds/$NUMBER/log $WORKSPACE/${JOB}_log.txt
          done
          
          Show
          lgorman luke gorman added a comment - this bit of bash does the trick IFS=","; JOBS="$TRIGGERED_JOB_NAMES" JOBARRAY=($JOBS) for JOB in "${JOBARRAY[@]}" do echo $JOB NUMBER_NAME="TRIGGERED_BUILD_NUMBER_${JOB}" NUMBER=$(eval echo \$$NUMBER_NAME) echo $NUMBER cp $JENKINS_HOME/jobs/$JOB/builds/$NUMBER/log $WORKSPACE/${JOB}_log.txt done
          Hide
          dubman Mike Dubman added a comment -

          it does not for matrix projects

          Show
          dubman Mike Dubman added a comment - it does not for matrix projects
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Alex Earl
          Path:
          src/main/java/hudson/plugins/emailext/AttachmentUtils.java
          src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherMatrixTest.java
          src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherTest.java
          http://jenkins-ci.org/commit/email-ext-plugin/8a47a78f5ed91c15f18e3a0cf2e2696b48514bec
          Log:
          Fix JENKINS-21861

          Add check for MatrixBuild

          Compare: https://github.com/jenkinsci/email-ext-plugin/compare/6acb6e2e76d8...8a47a78f5ed9

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: src/main/java/hudson/plugins/emailext/AttachmentUtils.java src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherMatrixTest.java src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherTest.java http://jenkins-ci.org/commit/email-ext-plugin/8a47a78f5ed91c15f18e3a0cf2e2696b48514bec Log: Fix JENKINS-21861 Add check for MatrixBuild Compare: https://github.com/jenkinsci/email-ext-plugin/compare/6acb6e2e76d8...8a47a78f5ed9
          Hide
          slide_o_mix Alex Earl added a comment -

          Should be in 2.40

          Show
          slide_o_mix Alex Earl added a comment - Should be in 2.40

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              dubman Mike Dubman
            • Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: