Thanks a lot zerozerounouno!!!!!!!!

I introduced the groovy script as you written and it's working fine!!!!!!!! 
Thanks again!

El jueves, 19 de mayo de 2016, 11:12:58 (UTC+2), [email protected] 
escribió:
>
> Il giorno giovedì 19 maggio 2016 10:19:35 UTC+2, Antonio Hernandez ha 
> scritto:
>  
>
>> I'm wondering how to manage the result of a job in other way as jenkins 
>> does because i have a job that the only thing it runs is a .jar file that 
>> can finsih ok or not but in both cases jenkins marks it as SUCESS, here is 
>> an example:
>>
>
> Hi,
> success or failure of jenkins jobs depends on the return value of 
> scripts/commands you launch from jenkins job configuration, so maybe you 
> just have to check the workflow of your job to be sure you are not ignoring 
> return values.
>
> Anyway, you can also use the Groovy Postbuild plugin to check for lines in 
> console output and change job result accordingly; you can use a groovy 
> script like this:
>
> // 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()
> }
>
> --
> 01
>

-- 
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/077887c3-894f-4a44-96a0-43ad84f49605%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to