Jakub Czaplicki (2015-07-08 17:57):

I would like to be able to set a build status to "Not built" or "Aborted" when a certain failure occur (specific string in a log I suppose).

For instance when a infrastructure failure occurs: "failed receiving gdi request response for mid=2 (got syncron message receive timeout error).".

Ideally, in such case, email notification should only be sent to Jenkins admin/Test team rather than individuals who commited the change that triggered Jenkins.

What would be the best way to approach this ?

When you catch some error you can echo something like "[ERROR] something". Just remeber to use something like `echo "[""ERROR]"` so that you won't match the code.

Then you can have a final guard that fails the build if it find "[ERROR]" and make it unstable if it finds a text "[WARNING]" (see screenshot below). Then in another post build step you can set build description based on the first matched error (example below). Probably might be more flexiable to do it with Groovy, but that method is fine if you don't have too many jobs.

Regards,
Nux.




--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/55B2085B.7010503%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.

Reply via email to