How to loop through the console output in Jenkins using customized jelly script? -


i trying write jelly script in jenkins email-ext returns part of console output. trying loop through console output 'failure'. can give me sample script or format doing using jelly script template?

thanks in advance.

maybe can use groovy, jelly harder that.

the sample included part of email-ext here groovy, i.e. retrieves last 100 lines of build output , uses stringescapeutils on each line ensure text not interpreted html:

<%  build.getlog(100).each() { line -> %> <tr><td class="console">${org.apache.commons.lang.stringescapeutils.escapehtml(line)}</td></tr> <%  } %> 

instead of escaping, decision , output stuff if condition holds, e.g.

${if(line.contains('mytext')) { // stuff here }} 

Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -