RE: jenkins e-mail ext DEFAULT_CONTENT does not expand

1,081 views
Skip to first unread message

Alex Earl

unread,
Apr 24, 2013, 9:59:51 AM4/24/13
to windycity, jenkins...@googlegroups.com
pre-build/post build added token
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_Part_89_9798859.1366811681215"

------=_Part_89_9798859.1366811681215
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit

They are expanded the same way, so I need more information (like your
global and project config XML) to try and determine the issue.

Sent from my Windows Phone
From: windycity
Sent: 4/24/2013 6:54
To: jenkins...@googlegroups.com
Subject: jenkins e-mail ext DEFAULT_CONTENT does not expand
pre-build/post build added token
I use jenkin's configuration pre-build and post build "Execute Groovy
System Script"-> command to get a token $MAVE_PREBUIL_VERSION and
$MAVEN_POSTBUILD_MAVEN, and put this at e-mail ext plugin configuration. In
both global and project session, DEFAULT_SUBJECT can extent these Tokens,
but DEFAULT_CONTENT can not, is this a known issue or I am not using it
right?

$DEFAULT_SUBJECT, ${MAVEN_PREBUILD_VERSION}, ${MAVEN_POSTBUILD_VERSION}
Above expand the token, but following does not


$DEFAULT_CONTENT, ${MAVEN_PREBUILD_VERSION}

Thanks in advance,

jessica

--
You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



------=_Part_89_9798859.1366811681215
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<html><head><meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Cont=
ent-Type"></head><body><div><div style=3D"font-family: Calibri,sans-serif; =
font-size: 11pt;">They are expanded the same way, so I need more informatio=
n (like your global and project config XML) to try and determine the issue.=
<br><br>Sent from my Windows Phone<br></div></div><hr><span style=3D"font-f=
amily: Tahoma,sans-serif; font-size: 10pt; font-weight: bold;">From: </span=
><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt;">windycity=
</span><br><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt; =
font-weight: bold;">Sent: </span><span style=3D"font-family: Tahoma,sans-se=
rif; font-size: 10pt;">4/24/2013 6:54</span><br><span style=3D"font-family:=
Tahoma,sans-serif; font-size: 10pt; font-weight: bold;">To: </span><span s=
tyle=3D"font-family: Tahoma,sans-serif; font-size: 10pt;">jenkinsci-users@g=
ooglegroups.com</span><br><span style=3D"font-family: Tahoma,sans-serif; fo=
nt-size: 10pt; font-weight: bold;">Subject: </span><span style=3D"font-fami=
ly: Tahoma,sans-serif; font-size: 10pt;">jenkins e-mail ext DEFAULT_CONTENT=
does not expand pre-build/post build added token</span><br><br></body></ht=
ml>I use jenkin's configuration pre-build and post build "Execute Groovy Sy=
stem Script"-&gt; command to get a token $MAVE_PREBUIL_VERSION and $MAVEN_P=
OSTBUILD_MAVEN, and put this at e-mail ext plugin configuration. In both gl=
obal and project session, DEFAULT_SUBJECT can extent these Tokens, but DEFA=
ULT_CONTENT can not, is this a known issue or I am not using it right?<br><=
br>$DEFAULT_SUBJECT, ${MAVEN_PREBUILD_VERSION}, ${MAVEN_POSTBUILD_VERSION} =
Above expand the token, but following does not<br><br><br>$DEFAULT_CONTENT,=
${MAVEN_PREBUILD_VERSION}<br><br>Thanks in advance,<br><br>jessica<br><br>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;Jenkins Users&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to jenkinsci-use...@googlegroups.com.<br />
For more options, visit <a href=3D"https://groups.google.com/groups/opt_out=
">https://groups.google.com/groups/opt_out</a>.<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_89_9798859.1366811681215--

windycity

unread,
Apr 24, 2013, 1:03:33 PM4/24/13
to jenkins...@googlegroups.com, windycity

Here attached are the global and project config files, please let me know what is wrong.

Thanks much for all your help!

Jessica
config_global.xml
config_project.xml

Slide

unread,
Apr 24, 2013, 3:33:08 PM4/24/13
to jenkins...@googlegroups.com, windycity
My apologies, I need the ExtendedEmailPublisher xml file from the root of JENKINS_HOME.

windycity

unread,
Apr 24, 2013, 3:43:22 PM4/24/13
to jenkins...@googlegroups.com, windycity
I am looking at this file, actually, I figure

${JELLY_SCRIPT,template=&quot;html&quot;}

is the problem, if I get rid of this, everything seems working, though I do not understand why. Somebody else put this in global configuration, maybe this format is wrong, maybe it should be ${JELLY_SCRIPT, html}?


 Following is the content of ExtendedEmailPublisher xml file from the root of JENKINS_HOME

Thanks much!

Jessica

<?xml version='1.0' encoding='UTF-8'?>
<hudson.plugins.emailext.ExtendedEmailPublisherDescriptor plugin="emai...@2.28">
  <hudsonUrl>http://openjdk2a:8081/jenkins/</hudsonUrl>
  <adminAddress>address not configured yet &lt;nobody&gt;</adminAddress>
  <useSsl>false</useSsl>
  <defaultContentType>text/html</defaultContentType>
  <defaultSubject>${MAVEN_PREBUILD_VERSION} $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!</defaultSubject>
  <defaultBody>$PROJECT_NAME ${MAVEN_PREBUILD_VERSION}  - Build # $BUILD_NUMBER - $BUILD_STATUS:&#xd;
&#xd;
Check console output at $BUILD_URL to view the results.&#xd;
&#xd;
${JELLY_SCRIPT,template=&quot;html&quot;}</defaultBody>
  <maxAttachmentSize>-1</maxAttachmentSize>
  <recipientList>j...@cboe.com</recipientList>
  <defaultReplyTo></defaultReplyTo>
  <overrideGlobalSettings>false</overrideGlobalSettings>
  <precedenceBulk>false</precedenceBulk>
  <debugMode>false</debugMode>
  <enableSecurity>false</enableSecurity>
</hudson.plugins.emailext.ExtendedEmailPublisherDescriptor>

Slide

unread,
Apr 24, 2013, 4:13:54 PM4/24/13
to jenkins...@googlegroups.com, windycity
Do you have any errors in jenkins logs?

windycity

unread,
Apr 24, 2013, 4:33:40 PM4/24/13
to jenkins...@googlegroups.com, windycity
By jenkins log, do you mean $JENKINS_HOME/jobs/project/builds/#/log file?  If this is the file you refer, it does have build errors, but sending mail seems fine.

Sending e-mails to: j...@cboe.com
channel stopped
Sending e-mails to: j...@cboe.com
Email was triggered for: Failure
Sending email for trigger: Failure
Sending email to: j...@cboe.com
Finished: FAILURE

If this is not the log you refer, would you please let me know where should be the log file?

Thanks much,

Jessica

Slide

unread,
Apr 24, 2013, 4:36:18 PM4/24/13
to jenkins...@googlegroups.com, windycity
No, I mean the actual stderr type logs for the Jenkins app itself, it would be in different places depending on how you are running Jenkins. Could be in the tomcat logs, etc.

windycity

unread,
Apr 24, 2013, 5:04:04 PM4/24/13
to jenkins...@googlegroups.com, windycity
We are using tomcat, I have logs at tomcat/apache-tomcat-6.0.35/logs/catalina.out, is that the right one? But this one does not have any Jenkins error. Build #23 is the trouble one.

Jessica

windycity

unread,
Apr 24, 2013, 5:10:20 PM4/24/13
to jenkins...@googlegroups.com, windycity

Attach log.


Jessica

Vladimir Zak

unread,
May 26, 2013, 7:06:32 AM5/26/13
to jenkins...@googlegroups.com, windycity
Hi,
I have the same problem. The strings are not replaced by URl for example - $BUILD_URL is not replaced.

In subjects it is replaced but NOT replaced in the other places.

zakyn

$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!

$PROJECT_URL
$BUILD_URL

Tests

$FAILED_TESTS

Changes

[%a] %m %p
${CHANGES,format=" "}





2013/4/24 windycity <jji...@gmail.com>

Vladimir Zak

unread,
May 26, 2013, 7:27:20 AM5/26/13
to jenkins...@googlegroups.com, windycity
Hi,

I used the last one LTS version of jenkins, email-ext-plugin - 2.30.2

I found only this

Email was triggered for: Before Build
Sending email for trigger: Before Build
Error evaluating token: Undefined parameter maxlines in token BUILD_LOG
Sending email to:

The new one is maxLines - after the change it seems to run OK.


Were the tokens changed? I used them for really long time heavily and I hope it has not been changed massively.

zakyn





2013/5/26 Vladimir Zak <zakvl...@gmail.com>

Slide

unread,
May 26, 2013, 11:00:34 AM5/26/13
to jenkins...@googlegroups.com

You need a space before format, also why are you setting the format to empty string.

Vladimir Zak

unread,
May 27, 2013, 1:42:11 AM5/27/13
to jenkins...@googlegroups.com
I had there this
${BUILD_LOG,maxlines=500} which did not work now but before the update it works more than a year.

No I have there
${BUILD_LOG,maxLines=500} and it works correctly.

zakyn


2013/5/26 Slide <slide...@gmail.com>
Reply all
Reply to author
Forward
0 new messages