template
MIME-Version: 1.0
Content-Type: multipart/alternative;
        boundary="----=_Part_1427_17794027.1343641681717"

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

build.getLog has a couple of versions for different purposes.

Sent from my Windows Phone
From: michael chiu
Sent: 7/30/2012 2:48 AM
To: [email protected]
Subject: how to read a slave log into email-ext via groovy script
template
hi ALL ,
                I add the following script in the email-ext groovy for
reading the failed_case.html into the mail body. It works if I run job on
the master node[linux].
<% def failed_case = new File(build.getWorkspace().getRemote()+
'\\failed_case.html')
                      println failed_case.text    %>
if failed ,if the job is running on the slave [windows version ] . I always
got "Exception: javax.script.ScriptException:
java.io.FileNotFoundException: d:\jenkins\workspace\xxxxx\failed_case.html
(No such file or directory) "


Do you know how to access the log in the slave node ?

------=_Part_1427_17794027.1343641681717
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;">build.getLog has a couple of versions for different purpo=
ses.<br><br>Sent from my Windows Phone<br></div></div><hr><span style=3D"fo=
nt-family: Tahoma,sans-serif; font-size: 10pt; font-weight: bold;">From: </=
span><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt;">micha=
el chiu</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-serif; font-size: 10pt;">7/30/2012 2:48 AM</span><br><span style=3D"fo=
nt-family: Tahoma,sans-serif; font-size: 10pt; font-weight: bold;">To: </sp=
an><span style=3D"font-family: Tahoma,sans-serif; font-size: 10pt;">jenkins=
[email protected]</span><br><span style=3D"font-family: Tahoma,sans=
-serif; font-size: 10pt; font-weight: bold;">Subject: </span><span style=3D=
"font-family: Tahoma,sans-serif; font-size: 10pt;">how to read a slave log =
into email-ext via groovy script template</span><br><br></body></html><span=
 style=3D"font-family: arial, sans-serif; font-size: 14.399999618530273px; =
">hi ALL ,</span><div style=3D"font-family: arial, sans-serif; font-size: 1=
4.399999618530273px; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nb=
sp; I add the following script in the email-ext groovy for reading the fail=
ed_case.html into the mail body. It works if I run job on the master node[l=
inux].&nbsp;</div><div style=3D"font-family: arial, sans-serif; font-size: =
14.399999618530273px; "><div>&lt;% def failed_case =3D new File(build.getWo=
rkspace().<wbr>getRemote()+ '\\failed_case.html')</div><div>&nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; println faile=
d_case.text &nbsp; &nbsp;%&gt;</div><div>if failed ,if the job is running o=
n the slave [windows version ] . I always got "<span style=3D"font-family: =
'Times New Roman', serif; font-size: 12pt; ">Exception: javax.script.Script=
Exception: java.io.FileNotFoundException: d:\jenkins\workspace\xxxxx\failed=
_case.<wbr>html (No such file or directory) "</span></div><p class=3D"MsoNo=
rmal" style=3D"margin-bottom: 0px; "><span style=3D"font-size: 12pt; font-f=
amily: 'Times New Roman', serif; ">&nbsp;<br></span></p><div>Do you know ho=
w to access the log in the slave node ?</div></div>
------=_Part_1427_17794027.1343641681717--

Reply via email to