by doing bit of googling, i found below piece of code,

import hudson.model.*
def currentBuild = Thread.currentThread().executable 
def pattern = /[0-9].[0-9].[0-9]-\d{4}}/

// Parsing 20 most recent lines of the build log 
log = currentBuild.getLog(20) 
for (line in log) { 
    match = (line =~ pattern) 
   if (match) { 
     currentBuild.setDescription(match[0][1]) 
     out.println "[set-build-description.groovy] Build description was set 
to: " + match[0][1] 
     break 
  } 
} 

But it doesnt work for me.. can anyone help ?

Thank
Maneesh

On Tuesday, January 21, 2014 2:35:23 PM UTC-8, Maneesh M P wrote:
>
> Hello,
>
>  I am using email-ext plugin to send my build mails.   based on the job 
> environment values, i create an html file and use the html file in the body 
> to send the mail
>   ${FILE, path="$WORKSPACE/mail.html"}
>
> I have a requirement where i have to put the subject of the mail parsing 
> console output.  is there a way?
> I not only want to put it on the subject but want to use it on the body as 
> well, but thought at least if i could put it on the subject it will be 
> useful.
>
> If there is a way in the build step itself to parse console output and set 
> the value as environment variable, I can use that variable everywhere
>
> Can someone please help ?
>
> Thanks,
> M. 
>

-- 
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-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to