Groovy Script to find the Cause of the Build Failure

61 views
Skip to first unread message

pbasan...@gmail.com

unread,
Oct 3, 2018, 9:31:23 AM10/3/18
to Jenkins Users
Hi All,

Need a groovy Postbuild script to find the cause of each Failure ..

I am using Build Failure analyzing toll to categorize the build failure and need to update the build descriptor with the Cause of the failure.

Regards,
Basanta

RAJENDRA PRASAD

unread,
Oct 3, 2018, 9:40:20 AM10/3/18
to jenkins...@googlegroups.com
If you have build failure log samples for each category I can write a groovy script generate reason for the that .

I don't know whether there are some.plugins already exist to analyse and categorise build failure cases.

Thanks,
Rajendra

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/714c6f6b-60eb-4fab-b4b2-66defeff79a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

pbasan...@gmail.com

unread,
Oct 3, 2018, 10:18:48 AM10/3/18
to Jenkins Users
Yes I have Different Failures ..
1. Infrastructure 2. K8S and 3. Environment ..
These category of causes created by analyzing the logs through the Build Analyzer Plugin .
Now the task is to update the same cause on the build descriptor so that the build metrics plugin will display the cause.

Regards,
Basanta

pbasan...@gmail.com

unread,
Oct 4, 2018, 12:48:56 AM10/4/18
to Jenkins Users

Here is the actual output from the console log : 

[BFA] Environment from category Environment Issue 
>>> here cause is the Environment 
Want the same cause to be updated on the build descriptor 

[BFA] Scanning build for known causes...
[BFA] Found failure cause(s):
[BFA] Environment from category Environment Issue
[BFA] Done. 0s


On Wednesday, October 3, 2018 at 7:10:20 PM UTC+5:30, rajendraprasad reddy wrote:

pbasan...@gmail.com

unread,
Oct 11, 2018, 4:16:10 AM10/11/18
to Jenkins Users
Hi Rajendra ,

Thanks for the info

Basically through the Build failure analyser plugin able to identify the problem now need a groovy script to get the failure cause and update the build descriptor.

Regards,
Basanta
Reply all
Reply to author
Forward
0 new messages