Hi Slide, I really appreciate your help but i already did everything except the config file provider...
<https://lh3.googleusercontent.com/-7b1etyVc_tc/V3KdWaLI1kI/AAAAAAAACDE/jnb6B330UusvWccXiHynQVD2O-yNEB-wQCLcB/s1600/email-plugin.jpg> Is it must be the problem with the variables? Thanks again El martes, 28 de junio de 2016, 15:40:50 (UTC+2), slide escribió: > > You would need to either install the config file provider plugin and > create a new Email Ext Groovy Template, or put the template on the file > system in JENKINS_HOME/email-templates. Then you could use the SCRIPT token > to specify the template in the content area of the post-build setup. > ${SCRIPT, template="file.template"} or for managed files ${SCRIPT, > template="managed:Name of Managed Item"} > > On Tue, Jun 28, 2016 at 6:33 AM Antonio Hernandez <[email protected] > <javascript:>> wrote: > >> Hi Slide, >> that's the problem i have, i don't know how to handle it. >> I have all the ingredients but i don´t know how to put all together in a >> rich format html..... >> I'm desperate with that because i've never developed in html >> Thanks again, >> >> El martes, 28 de junio de 2016, 14:36:04 (UTC+2), slide escribió: >> >>> How are you specifying the content? >>> >>> On Tue, Jun 28, 2016, 03:20 Antonio Hernandez <[email protected]> wrote: >>> >> hi there!, >>>> >>>> I'm very confused when i'm trying to send an email with all changes and >>>> also with the console output. >>>> >>>> To get all the information together i'm using: >>>> >>>> one script writing all the changes in a file like this: >>>> >>>> | Author: [ ] | Subject: [bugfix/XXX-YYY..] | When: [2016-06-23] | >>>> Commit: [5b20a12] | >>>> >>>> |-------------------------------------------------------------------------------------------------------| >>>> XXX/runme.groovy | 1 + >>>> 1 file changed, 1 insertion(+) >>>> >>>> >>>> and also i installed the parser Console output configured to >>>> highlighing only errors (in red) and info (in blue), something like this: >>>> >>>> ------------------------------- >>>> TC04 --> started!---------> Step 01 OK! >>>> >>>> ---------> Step 02 KO :( >>>> >>>> >>>> >>>> And finally i have a template to put all together, here is the example: >>>> >>>> >>>> <STYLE> >>>> BODY, TABLE, TD, TH, P { >>>> font-family:Verdana,Helvetica,sans serif; >>>> font-size:11px; >>>> color:black; >>>> } >>>> h1 { color:black; } >>>> h2 { color:black; } >>>> h3 { color:black; } >>>> TD.bg1 { color:white; background-color:#0000C0; font-size:120% } >>>> TD.bg2 { color:white; background-color:#4040FF; font-size:110% } >>>> TD.bg3 { color:white; background-color:#8080FF; } >>>> TD.test_passed { color:blue; } >>>> TD.test_failed { color:red; } >>>> TD.console { font-family:Courier New; } >>>> </STYLE> >>>> <BODY> >>>> >>>> <TABLE> >>>> <TR><TD align="right"><IMG >>>> SRC="${rooturl}static/e59dfe28/images/32x32/<%= build.result.toString() == >>>> 'SUCCESS' ? "blue.gif" : build.result.toString() == 'FAILURE' ? 'red.gif' >>>> : >>>> 'yellow.gif' %>" /> >>>> </TD><TD valign="center"><B style="font-size: 200%;">BUILD >>>> ${build.result}</B></TD></TR> >>>> <TR><TD>URL</TD><TD><A >>>> href="${rooturl}${build.url}">${rooturl}${build.url}</A></TD></TR> >>>> <TR><TD>Project:</TD><TD>${project.name}</TD></TR> >>>> <TR><TD>Date:</TD><TD>${it.timestampString}</TD></TR> >>>> <TR><TD>Duration:</TD><TD>${build.durationString}</TD></TR> >>>> <TR><TD>Cause:</TD><TD><% build.causes.each() { cause -> %> >>>> ${cause.shortDescription} <% } %></TD></TR> >>>> </TABLE> >>>> <BR/> >>>> >>>> <!-- CHANGE SET --> >>>> <% def changeSet = build.changeSet >>>> if(changeSet != null) { >>>> def hadChanges = false %> >>>> <TABLE width="100%"> >>>> <TR><TD class="bg1" colspan="2"><B>CHANGES</B></TD></TR> >>>> <% changeSet.each() { cs -> >>>> hadChanges = true %> >>>> <TR> >>>> <TD colspan="2" class="bg2"> Revision <B><%= >>>> cs.metaClass.hasProperty('commitId') ? cs.commitId : >>>> cs.metaClass.hasProperty('revision') ? cs.revision : >>>> cs.metaClass.hasProperty('changeNumber') ? cs.changeNumber : "" >>>> %></B> by >>>> <B><%= cs.author %>: </B> >>>> <B>(${cs.msgAnnotated})</B> >>>> </TD> >>>> </TR> >>>> <% cs.affectedFiles.each() { p -> %> >>>> <TR> >>>> <TD width="10%"> ${p.editType.name}</TD> >>>> <TD>${p.path}</TD> >>>> </TR> >>>> <% } >>>> } >>>> if(!hadChanges) { %> >>>> <TR><TD colspan="2">No Changes</TD></TR> >>>> <% } %> >>>> </TABLE> >>>> <BR/> >>>> <% } %> >>>> >>>> <!-- ARTIFACTS --> >>>> <% def artifacts = build.artifacts >>>> if(artifacts != null && artifacts.size() > 0) { %> >>>> <TABLE width="100%"> >>>> <TR><TD class="bg1"><B>BUILD ARTIFACTS</B></TD></TR> >>>> <TR> >>>> <TD> >>>> <% artifacts.each() { f -> %> >>>> <li> >>>> <a href="${rooturl}${build.url}artifact/${f}">${f}</a> >>>> </li> >>>> <% } %> >>>> </TD> >>>> </TR> >>>> </TABLE> >>>> <BR/> >>>> <% } %> >>>> >>>> ............. >>>> >>>> -------- >>>> When i received the mail no variable is translated: >>>> >>>> >>>> " /> *BUILD ${build.result}* >>>> URL ${rooturl}${build.url} >>>> Project: ${project.name} >>>> Date: ${it.timestampString} >>>> Duration: ${build.durationString} >>>> Cause: <% build.causes.each() { cause -> %> ${cause.shortDescription} >>>> <% } %> >>>> <% def changeSet = build.changeSet if(changeSet != null) { def >>>> hadChanges = false %> >>>> *CHANGES* >>>> <% changeSet.each() { cs -> hadChanges = true %> >>>> Revision *<%= cs.metaClass.hasProperty('commitId') ? cs.commitId : >>>> cs.metaClass.hasProperty('revision') ? cs.revision : >>>> cs.metaClass.hasProperty('changeNumber') ? cs.changeNumber : "" %>* by >>>> *<%= >>>> cs.author %>:**(${cs.msgAnnotated})* >>>> >>>> >>>> >>>> -------- >>>> >>>> How can i get the email with all variables translated? >>>> How can i mix my changes file, my parse output log in a rich format >>>> mail ? >>>> >>>> >>>> any help will be appreciated so much >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> 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 [email protected]. >>> >>> >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/jenkinsci-users/7c57e877-2ee5-4d87-965d-884fef28351c%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/jenkinsci-users/7c57e877-2ee5-4d87-965d-884fef28351c%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >> 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 [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-users/2d4569b5-3201-4512-8989-6a4195efa1d4%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-users/2d4569b5-3201-4512-8989-6a4195efa1d4%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8d476002-0585-4e89-adf1-4d24faeae0e8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
