• Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • email-ext-plugin
    • None

      I am using email-ext 2.28.
      In my default content section I add:
      ${BUILD_LOG, maxLines=9999, escapeHtml=false}
      All done default!

      And in my Success Trigger I have:
      ${BUILD_LOG, maxLines=9999, escapeHtml=false}
      All done success!

      When I run the maven build I get an email with the following contents:
      ===============================
      Started by user Alex Gray
      Building remotely on s-9aedb7d1 in workspace /scratch/jenkins/workspace/foo
      Checkout:foo / /scratch/jenkins/workspace/foo - hudson.remoting.Channel@18eddc0a:s-9aedb7d1
      Using strategy: Default
      Last Built Revision: Revision d68fcab0bd077e2e4969819195c163863635ae80 (origin/master) Wiping out workspace first.
      Cloning the remote Git repository
      Cloning repository git@bitbucket.org:foo/foo.git
      git --version
      git version 1.7.11.7
      Fetching upstream changes from origin
      Commencing build of Revision d68fcab0bd077e2e4969819195c163863635ae80 (origin/master) Checking out Revision d68fcab0bd077e2e4969819195c163863635ae80 (origin/master) No emails were triggered.
      Parsing POMs
      [vxmlGen] $ /opt/jdk/jdk1.7.latest/bin/java -cp /scratch/jenkins/maven3-agent.jar:/opt/maven/apache-maven-3.0.3/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /opt/maven/apache-maven-3.0.3 /scratch/jenkins/slave.jar /scratch/jenkins/maven3-interceptor.jar 56024 <===[JENKINS REMOTING CAPACITY]===>
      ===============================

      Notice the following:
      1) The email does not have the entire log output. It looks like the email-ext plugin things the log file ends at "JENKINS REMOTING CAPACITY".
      2) Notice that the text "All done default!" or "All done success!" is not in the message body.

      I've attached a screenshot of all the options I am using for the email-ext plugin.

      Is there a workaround? Maybe use the regex to include .* as the build?

      Thanks!

        1. email-ext.png
          email-ext.png
          67 kB
        2. mavenConfigure.png
          mavenConfigure.png
          2 kB
        3. mavenInstallation.png
          mavenInstallation.png
          6 kB
        4. mavenProject..png
          mavenProject..png
          10 kB
        5. pom.xml
          0.7 kB

          [JENKINS-17838] full build log not in content of email

          Alex Gray added a comment -

          Unfortunately I don't see anything suspicious in the logs. (ie no exceptions, no errors, no info) related to this.
          This leads me to believe it's "working", but not in the way I would expect it to.
          I'm also going to try free-style project, to see if it's just something weird with maven projects.

          Alex Gray added a comment - Unfortunately I don't see anything suspicious in the logs. (ie no exceptions, no errors, no info) related to this. This leads me to believe it's "working", but not in the way I would expect it to. I'm also going to try free-style project, to see if it's just something weird with maven projects.

          Alex Earl added a comment -

          Can you view the source of the email? I'm wondering if the content is there, but there are < > in the content which is causing it to be read as HTML. This would explain also why the content you have after is not showing up.

          Alex Earl added a comment - Can you view the source of the email? I'm wondering if the content is there, but there are < > in the content which is causing it to be read as HTML. This would explain also why the content you have after is not showing up.

          Alex Gray added a comment -

          I looked at the raw source of the email and the content is not there.
          Also, I did a free style build (instead of a maven build), and the entire contents of the log gets displayed in the body of the email.
          In other words, this works for free style projects: ${BUILD_LOG, maxLines=9999, escapeHtml=false}
          But not for maven builds.

          Hope this helps.

          Alex Gray added a comment - I looked at the raw source of the email and the content is not there. Also, I did a free style build (instead of a maven build), and the entire contents of the log gets displayed in the body of the email. In other words, this works for free style projects: ${BUILD_LOG, maxLines=9999, escapeHtml=false} But not for maven builds. Hope this helps.

          Alex Earl added a comment -

          Hmmm, I have very little experience with Maven projects, so I don't know how they are different if at all. Do you know the class of the Maven project, I can look if it does log stuff differently.

          Alex Earl added a comment - Hmmm, I have very little experience with Maven projects, so I don't know how they are different if at all. Do you know the class of the Maven project, I can look if it does log stuff differently.

          Alex Gray added a comment -

          No problem! When I get to work tomorrow I'll create some detailed steps to reproduce this problem.
          One other piece to the puzzle is that I'm using Cloudbees Jenkins, which means that the slaves are dynamically provisioned to run a build.
          I don't know if that bit of information is useful or not, but I thought I'd let you know.

          Alex Gray added a comment - No problem! When I get to work tomorrow I'll create some detailed steps to reproduce this problem. One other piece to the puzzle is that I'm using Cloudbees Jenkins, which means that the slaves are dynamically provisioned to run a build. I don't know if that bit of information is useful or not, but I thought I'd let you know.

          Alex Gray added a comment -

          I added a dummy pom.xml to this jar. In Jenkins create a new "Maven project" (I attached a screenshot of creating this type of project). I don't know if you need a plugin to create a Maven project, or if it comes out-of-the-box-Jenkins.

          In the configuration of the job, point it to the pom.xml and select "test" as the target (I've attached a screenshot of this too).

          The build will fail, since there are no sources, but it doesn't have to pass to reproduce this problem.

          When you build it, the text on the console will have something like:
          ==========================
          blah blah blah
          blah <===[JENKINS REMOTING CAPACITY]===>
          blah blah blah
          Failure
          ==========================
          The message body will only contain stuff above the "Jenkins Remoting Capacity" text.

          On a side note, I'm also going to try to get rid of one other variable: Cloudbees. I'm going to install Jenkins locally on my machine and try to reproduce this. I'm more and more convinced that it has to do with how Jenkins Cloudbees handles the console text. The reason I say this is because if I just try to echo out the contents of the console text, it works fine.

          I will let you know my results.

          Alex Gray added a comment - I added a dummy pom.xml to this jar. In Jenkins create a new "Maven project" (I attached a screenshot of creating this type of project). I don't know if you need a plugin to create a Maven project, or if it comes out-of-the-box-Jenkins. In the configuration of the job, point it to the pom.xml and select "test" as the target (I've attached a screenshot of this too). The build will fail, since there are no sources, but it doesn't have to pass to reproduce this problem. When you build it, the text on the console will have something like: ========================== blah blah blah blah <=== [JENKINS REMOTING CAPACITY] ===> blah blah blah Failure ========================== The message body will only contain stuff above the "Jenkins Remoting Capacity" text. On a side note, I'm also going to try to get rid of one other variable: Cloudbees. I'm going to install Jenkins locally on my machine and try to reproduce this. I'm more and more convinced that it has to do with how Jenkins Cloudbees handles the console text. The reason I say this is because if I just try to echo out the contents of the console text, it works fine. I will let you know my results.

          Alex Earl added a comment -

          I am getting the following:

          Started by user anonymous
          Building in workspace /home/user/Projects/email-ext-plugin/work/workspace/JENKINS-17838
          No emails were triggered.
          Parsing POMs
          JENKINS-17838 $ java -Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=47661 -cp /home/user/Projects/email-ext-plugin/./work/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/home/user/bin/apache-maven-3.0.5/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/user/bin/apache-maven-3.0.5 /home/user/Projects/email-ext-plugin/target/work/webapp/WEB-INF/lib/remoting-2.23.jar /home/user/Projects/email-ext-plugin/./work/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar 40854
          ERROR: transport error 202: connect failed: Connection refused
          ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
          JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:741]
          FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)

          Not sure what the issue is...

          Alex Earl added a comment - I am getting the following: Started by user anonymous Building in workspace /home/user/Projects/email-ext-plugin/work/workspace/ JENKINS-17838 No emails were triggered. Parsing POMs JENKINS-17838 $ java -Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=47661 -cp /home/user/Projects/email-ext-plugin/./work/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/home/user/bin/apache-maven-3.0.5/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/user/bin/apache-maven-3.0.5 /home/user/Projects/email-ext-plugin/target/work/webapp/WEB-INF/lib/remoting-2.23.jar /home/user/Projects/email-ext-plugin/./work/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar 40854 ERROR: transport error 202: connect failed: Connection refused ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:741] FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197) Not sure what the issue is...

          Alex Gray added a comment - - edited

          Weird. I just tried this on a clean windows machine. I installed Jenkins, created a dummy maven job, and pointed it to the pom that I attached. I didn't even indicate a maven target.
          The only thing I can suggest is to make sure that under Manage Jenkins, you specify a Maven Install (I attached a screenshot called mavenInstallation.png which shows a screenshot of my maven configuration.)

          Alex Gray added a comment - - edited Weird. I just tried this on a clean windows machine. I installed Jenkins, created a dummy maven job, and pointed it to the pom that I attached. I didn't even indicate a maven target. The only thing I can suggest is to make sure that under Manage Jenkins, you specify a Maven Install (I attached a screenshot called mavenInstallation.png which shows a screenshot of my maven configuration.)

          Alex Earl added a comment -

          I just tried this again, it looks like because I am running under the Netbeans debugger it causes an issue with running the Maven. When I just run (without the debugger) I am still not able to reproduce this issue with the Maven job. I get the following output in the email that is sent to me.

          Started by user anonymous
          Building in workspace /home/USER/Projects/email-ext-plugin/work/workspace/JENKINS-17838
          No emails were triggered.
          Parsing POMs
          [JENKINS-17838] $ java -cp /home/USER/Projects/email-ext-plugin/./work/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/home/USER/Projects/email-ext-plugin/work/tools/hudson.tasks.Maven_MavenInstallation/Default/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/USER/Projects/email-ext-plugin/work/tools/hudson.tasks.Maven_MavenInstallation/Default /home/USER/Projects/email-ext-plugin/target/work/webapp/WEB-INF/lib/remoting-2.23.jar /home/USER/Projects/email-ext-plugin/./work/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar 47250
          <===[JENKINS REMOTING CAPACITY]===>   channel started
          log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter).
          log4j:WARN Please initialize the log4j system properly.
          Executing Maven:  -B -f /home/USER/Projects/email-ext-plugin/work/workspace/JENKINS-17838/pom.xml test
          [INFO] Scanning for projects...
          [INFO]
          [INFO] ------------------------------------------------------------------------
          [INFO] Building foo 1.0
          [INFO] ------------------------------------------------------------------------
          [INFO]
          [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ foo ---
          [debug] execute contextualize
          [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
          [INFO] skip non existing resourceDirectory /home/USER/Projects/email-ext-plugin/work/workspace/JENKINS-17838/src/main/resources
          [INFO]
          [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ foo ---
          [INFO] No sources to compile
          [INFO] [debug] execute contextualize
          [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
          [INFO] skip non existing resourceDirectory /home/USER/Projects/email-ext-plugin/work/workspace/JENKINS-17838/src/test/resources
          
          [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ foo ---
          [INFO] [INFO] No sources to compile
          
          [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ foo ---
          [INFO]
          [INFO] --- maven-surefire-plugin:2.10:test (default-test) @ foo ---
          [INFO] No tests to run.
          [INFO] Surefire report directory: /home/USER/Projects/email-ext-plugin/work/workspace/JENKINS-17838/target/surefire-reports
          
          -------------------------------------------------------
           T E S T S
          -------------------------------------------------------
          
          Results :
          
          Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
          
          [JENKINS] Recording test results
          [INFO] ------------------------------------------------------------------------
          [INFO] BUILD SUCCESS
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: 7.681s
          [INFO] Finished at: Wed May 15 04:37:41 MST 2013
          [INFO] Final Memory: 8M/59M
          [INFO] ------------------------------------------------------------------------
          [JENKINS] Archiving /home/USER/Projects/email-ext-plugin/work/workspace/JENKINS-17838/pom.xml to /home/USER/Projects/email-ext-plugin/work/jobs/JENKINS-17838/modules/foo$foo/builds/2013-05-15_04-37-27/archive/foo/foo/1.0/foo-1.0.pom
          Waiting for Jenkins to finish collecting data
          channel stopped
          Email was triggered for: Success
          Sending email for trigger: Success
          
          All done success!
          

          Alex Earl added a comment - I just tried this again, it looks like because I am running under the Netbeans debugger it causes an issue with running the Maven. When I just run (without the debugger) I am still not able to reproduce this issue with the Maven job. I get the following output in the email that is sent to me. Started by user anonymous Building in workspace /home/USER/Projects/email-ext-plugin/work/workspace/JENKINS-17838 No emails were triggered. Parsing POMs [JENKINS-17838] $ java -cp /home/USER/Projects/email-ext-plugin/./work/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/home/USER/Projects/email-ext-plugin/work/tools/hudson.tasks.Maven_MavenInstallation/Default/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/USER/Projects/email-ext-plugin/work/tools/hudson.tasks.Maven_MavenInstallation/Default /home/USER/Projects/email-ext-plugin/target/work/webapp/WEB-INF/lib/remoting-2.23.jar /home/USER/Projects/email-ext-plugin/./work/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar 47250 <===[JENKINS REMOTING CAPACITY]===> channel started log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter). log4j:WARN Please initialize the log4j system properly. Executing Maven: -B -f /home/USER/Projects/email-ext-plugin/work/workspace/JENKINS-17838/pom.xml test [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building foo 1.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-resources-plugin:2.5:resources ( default -resources) @ foo --- [debug] execute contextualize [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /home/USER/Projects/email-ext-plugin/work/workspace/JENKINS-17838/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile ( default -compile) @ foo --- [INFO] No sources to compile [INFO] [debug] execute contextualize [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory /home/USER/Projects/email-ext-plugin/work/workspace/JENKINS-17838/src/test/resources [INFO] --- maven-resources-plugin:2.5:testResources ( default -testResources) @ foo --- [INFO] [INFO] No sources to compile [INFO] --- maven-compiler-plugin:2.3.2:testCompile ( default -testCompile) @ foo --- [INFO] [INFO] --- maven-surefire-plugin:2.10:test ( default -test) @ foo --- [INFO] No tests to run. [INFO] Surefire report directory: /home/USER/Projects/email-ext-plugin/work/workspace/JENKINS-17838/target/surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [JENKINS] Recording test results [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.681s [INFO] Finished at: Wed May 15 04:37:41 MST 2013 [INFO] Final Memory: 8M/59M [INFO] ------------------------------------------------------------------------ [JENKINS] Archiving /home/USER/Projects/email-ext-plugin/work/workspace/JENKINS-17838/pom.xml to /home/USER/Projects/email-ext-plugin/work/jobs/JENKINS-17838/modules/foo$foo/builds/2013-05-15_04-37-27/archive/foo/foo/1.0/foo-1.0.pom Waiting for Jenkins to finish collecting data channel stopped Email was triggered for : Success Sending email for trigger: Success All done success!

          Alex Gray added a comment -

          OK. It looks like you've done your due diligence on this, and if you're OK we can probably close this out. The workaround of attaching the log is more than acceptable. I noticed that Cloudbees is not using the latest and greatest version of the mail-ext plugin (2.2.8, not 2.2.9), so there may be other issues going on. Thank you so much for looking into this. I'll continue trying out some things and if I make any progress I'll update this Jira. Thanks!

          Alex Gray added a comment - OK. It looks like you've done your due diligence on this, and if you're OK we can probably close this out. The workaround of attaching the log is more than acceptable. I noticed that Cloudbees is not using the latest and greatest version of the mail-ext plugin (2.2.8, not 2.2.9), so there may be other issues going on. Thank you so much for looking into this. I'll continue trying out some things and if I make any progress I'll update this Jira. Thanks!

            slide_o_mix Alex Earl
            grayaii Alex Gray
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: