Hi Slide,
I worked-around on it and i changed it
with ${JELLY_SCRIPT,template="template"} because i'm using a .jelly
template now and it's working.
Thanks a lot!*Antonio Hernandez Pinto* *Contact Me:* <https://www.linkedin.com/in/antonio-hern%C3%A1ndez-pinto-3393b166> 2016-05-20 16:03 GMT+02:00 Slide <[email protected]>: > It looks like you are trying to use groovy templates, which means you need > to use ${SCRIPT, template="yourfile.html"} > > On Fri, May 20, 2016, 00:20 Antonio Hernandez <[email protected]> wrote: > >> Hi, >> In Default Content form in the email-ext configuration, using FILE token >> to send the email directly ${FILE, path="email.html"} >> >> But it not working because it's unable to resolve any of the variables... >> i have no idea how to make it works and resolve all the body >> >> Any idea? >> >> *Antonio Hernandez Pinto* >> >> *Contact Me:* >> >> <https://www.linkedin.com/in/antonio-hern%C3%A1ndez-pinto-3393b166> >> >> 2016-05-20 9:09 GMT+02:00 Slide <[email protected]>: >> >>> How are you using this in the project setup for email-ext? >>> >>> On Thu, May 19, 2016, 23:44 Antonio Hernandez <[email protected]> >>> wrote: >>> >>>> Hi again, >>>> I worked around it and i have a template attached but no variable is >>>> being resolved and the email is something like this: >>>> >>>> >>>> -------------------------------- >>>> >>>> *BUILD ${build.result}* >>>> >>>> Build URL >>>> >>>> ${rooturl}${build.url} >>>> >>>> Project: >>>> >>>> ${project.name} >>>> >>>> Date of build: >>>> >>>> ${it.timestampString} >>>> >>>> Build duration: >>>> >>>> ${build.durationString} >>>> >>>> Build cause: >>>> <% for (hudson.model.Cause cause : build.causes) { %> >>>> >>>> ${cause.shortDescription} >>>> <% } %> >>>> >>>> Build description: >>>> >>>> ${build.description} >>>> >>>> Built on: >>>> >>>> ${built_on} >>>> >>>> Total Builds: >>>> >>>> ${total_builds} >>>> >>>> FAILURES: >>>> >>>> ${total_failed} out of ${total_builds} builds FAILED! >>>> <% if (healthReports != null) { %> Health Report >>>> >>>> *W* >>>> >>>> *Description* >>>> >>>> *Score* >>>> >>>> ${healthReport.description} >>>> >>>> ${healthReport.score} >>>> >>>> >>>> >>>> <% } %> >>>> >>>> <% if (build.changeSet != null) { boolean hadChanges = false >>>> hudson.scm.ChangeLogSet cs = build.getChangeSet() %> >>>> *Changes* >>>> >>>> >>>> <% for (hudson.scm.ChangeLogSet.Entry entry : cs) { hadChanges = true >>>> %> >>>> ${entry.msgAnnotated} >>>> >>>> by *${entry.author}* >>>> <% for (hudson.scm.ChangeLogSet.AffectedFile p : entry.affectedFiles) { >>>> %> >>>> >>>> ${p.editType.name} >>>> >>>> ${p.path} >>>> >>>> <% } if (hadChanges == false) { %>No Changes >>>> <% } } %>Architecture Summary >>>> <% for (String __val : architecture_status.keySet()) { Integer >>>> _total_cnt = architecture_total_builds.get(__val) Integer _failed_cnt = >>>> architecture_total_failed.get(__val) hudson.model.Result __result = >>>> architecture_status.get(__val) if (__result == Result.SUCCESS) { %> >>>> >>>> ${__val} - OK >>>> >>>> ${__val} - FAILED. ${_failed_cnt} out of ${_total_cnt} failed to build! >>>> Toolchain Summary >>>> <% for (String __val : toolchain_status.keySet()) { hudson.model.Result >>>> __result = toolchain_status.get(__val) Integer _total_cnt = >>>> toolchain_total_builds.get(__val) Integer _failed_cnt = >>>> toolchain_total_failed.get(__val) if (__result == Result.SUCCESS) { %> >>>> >>>> ${__val} - OK >>>> >>>> ${__val} - FAILED. ${_failed_cnt} out of ${_total_cnt} failed to build! >>>> <% if (something_failed == true) { %>Information >>>> >>>> A change you committed to a source repository *MAY* be responsible for >>>> breaking a build. >>>> Review the data below or follow the link below to review the output of >>>> the build. >>>> If your change was responsible for the build failure, *fix ASAP*. >>>> If your change is not responsible, there is no need to respond to this >>>> email. >>>> *All developers with changes* associated with this build failure will >>>> continue to be notified until the build succeeds. >>>> *All developers that are notified* of a build failure will be informed >>>> by email when the build is once again successful. >>>> Instructions to reproduce the build failure will follow. >>>> <% for (hudson.matrix.MatrixRun run : runs) { if (run.getResult() != >>>> Result.SUCCESS) { String toolchain_val run_configuration = run.getParent() >>>> url = run.getUrl() configuration_combination = >>>> run_configuration.getCombination() toolchain = >>>> configuration_combination.get(toolchain_axis) architecture = >>>> configuration_combination.get(architecture_axis) toolchain_val = toolchain >>>> %>${toolchain_val} - ${architecture} Build Details >>>> >>>> Build Output: >>>> >>>> ${rooturl}${url}/console >>>> >>>> Reproduce: >>>> >>>> ARCH=${architecture} XENV=${toolchain_val} make >>>> >>>> >>>> <% } } } %> >>>> >>>> -------------------------------- >>>> >>>> >>>> 1. In Default Content form in the email-ext configuration, I'm >>>> using FILE like ${FILE, path="/home/../../email.html"} >>>> >>>> Any idea what i'm doing wrong? >>>> thanks again >>>> >>>> >>>> El jueves, 19 de mayo de 2016, 12:42:35 (UTC+2), Antonio Hernandez >>>> escribió: >>>>> >>>>> Hi everyone, >>>>> >>>>> I'm working now in a better way to send a report by email because the >>>>> report i have now is a pretty useless because the only thing it sending is >>>>> a attatched report like this: >>>>> >>>>> Ejecutando en el nodo principalen el espacio de trabajo >>>>> /home/locken/JENKINS_HOME/jobs/Nightly_LSA_Evolution_TESTS/workspace >>>>> No emails were triggered. >>>>> executing script 'Run_All_Nightly_Tests' >>>>> [workspace] $ /bin/sh /tmp/build_step_template6325968638781665777.sh >>>>> >>>>> >>>>> ------------------------------- >>>>> Nightly.TC01 --> started! >>>>> ---------> Step 01 OK! >>>>> ---------> Step 02 OK! >>>>> ---------> Steps 03 & 04 OK! >>>>> ---------> Step 05 OK! >>>>> ---------> Step 06 OK! >>>>> ---------> Step 07 OK! >>>>> ---------> Step 08 OK! >>>>> ---------> Step 09 OK! >>>>> Nightly.TC01 --> OK! >>>>> ------------------------------- >>>>> >>>>> >>>>> ------------------------------- >>>>> Nightly.TC02 --> started! >>>>> ---------> Step 01 OK! >>>>> ---------> Step 02 OK! >>>>> ---------> Steps 03 & 04 & 05 OK! >>>>> ---------> Step 06 OK! >>>>> ---------> Step 07 OK! >>>>> ---------> Step 08 OK! >>>>> ---------> Step 09 OK! >>>>> ---------> Step 10 OK! >>>>> ---------> Steps 11 & 12 OK! >>>>> ---------> Step 13 OK! >>>>> ---------> Step 14 OK! >>>>> Nightly.TC02 --> OK! >>>>> . >>>>> . >>>>> . >>>>> . >>>>> I'm using Editable Email Notificacion plugin but i don't know to use >>>>> it in a better way to create a mail with written the body with build.log >>>>> and a warning if the build was wrong or a check if it was fine >>>>> >>>>> >>>>> I'm using this script (thanks to zerozerounouno one more time!!!!!!!! >>>>> ) >>>>> >>>>> // Fail for Java exceptions >>>>> if(manager.logContains(".*Exception in thread.*")) { >>>>> manager.addErrorBadge("Java exception") >>>>> manager.createSummary("warning.gif").appendText("<h3>Java >>>>> exception detected.</h3>", false, false, false, "red") >>>>> manager.buildFailure() >>>>> } >>>>> >>>>> and it's working fine in order to know at the end if the job was OK or >>>>> KO but i want to add something like that in the email´s body >>>>> >>>>> >>>>> Thanks in advance >>>>> >>>> -- >>>> 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/4819b18e-994f-4a68-845e-d2911b65834c%40googlegroups.com >>>> <https://groups.google.com/d/msgid/jenkinsci-users/4819b18e-994f-4a68-845e-d2911b65834c%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 a topic in the >>> Google Groups "Jenkins Users" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/jenkinsci-users/66QcvqsV0c4/unsubscribe >>> . >>> To unsubscribe from this group and all its topics, send an email to >>> [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVc67TR%2BPc%3DNfQY9L2uKRfJ8x6AHRbQGJw5ptXpe8iL1DQ%40mail.gmail.com >>> <https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVc67TR%2BPc%3DNfQY9L2uKRfJ8x6AHRbQGJw5ptXpe8iL1DQ%40mail.gmail.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/CAL6pM4n51wDvqTOKgyhr6y1VEUXANRw6wKWQB0ONqJh7-Vj9uQ%40mail.gmail.com >> <https://groups.google.com/d/msgid/jenkinsci-users/CAL6pM4n51wDvqTOKgyhr6y1VEUXANRw6wKWQB0ONqJh7-Vj9uQ%40mail.gmail.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 a topic in the > Google Groups "Jenkins Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/jenkinsci-users/66QcvqsV0c4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVdOiRDX-XDh%3D0Oe%2BR%2B%3DrBVpXRj-j8oD8kqwqrK6XgceYQ%40mail.gmail.com > <https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVdOiRDX-XDh%3D0Oe%2BR%2B%3DrBVpXRj-j8oD8kqwqrK6XgceYQ%40mail.gmail.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/CAL6pM4mScvCTfaGLZrYph%3DJV2%2Bg%3D-NzpJ03iBS6pWjbv4MAkRw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
