Build failure analyzer - HOWTO Multi-line build log indication

168 views
Skip to first unread message

Jan Seidel

unread,
May 20, 2014, 8:23:15 AM5/20/14
to jenkins...@googlegroups.com
Hi *,

we have some issue going on as we have a build user who syncs from an external source. So all commits in our repository are from the service user instead of the developer.
But we need a way to unwrap this as we else always would have to do theis manually. That would cost one person several hours a day :(

My idea was to analyse the build logs and to make entries which at first glance tells who is responsible to fix the error.
Each java project as a single function owner which makes it quite easy to map.
Maybe I find a solution to process the log further so we can send mails to individuals in charge.

Build failure analyzer looks to me like being a good starting point.
What I now try is to find 2 patterns in a block.


[javac] Compiling 6 source files to d:\Jenkins_slave_centos\workspace\CB_XXXX_HIGH\xxxxxxxxxxxx\bin
[javac] d:\Jenkins_slave_centos\workspace\CB_xxxxxxxxxxxx_HIGH\xxxxxxxxxxxx\src\de\xxxxxxxxxxxx\messaging\xxxxxxxxxxxx\xxxxxxxxxxxx.java:254: cannot find symbol
[javac] symbol  : method getisEmpty()
[javac] location: class xxxxxxxxxxxx.model.xxxxxxxxxxxx
[javac]             ( ((xxxxxxxxxxxx)getModel( ICoreMessagingModelBank.FOLDER_CONTENT_SEARCH_SPELLER, terminalID )).getisEmpty() == true ) // Messaging_folderContentSearchSpeller_isEmpty==true
[javac]                                                                                                            ^
[javac] d:\Jenkins_slave_centos\workspace\CB_xxxxxxxxxxxx_HIGH\xxxxxxxxxxxx\src\de\xxxxxxxxxxxx\messaging\xxxxxxxxxxxx\xxxxxxxxxxxx.java:434: cannot find symbol
[javac] symbol  : method getisEmpty()
[javac] location: class xxxxxxxxxxxx.model.xxxxxxxxxxxx
[javac]             ( ((xxxxxxxxxxxx)getModel( ICoreMessagingModelBank.FOLDER_CONTENT_SEARCH_SPELLER, terminalID )).getisEmpty() == true ) // Messaging_folderContentSearchSpeller_isEmpty==true
[javac]                                                                                                            ^
[javac] 2 errors


The first line was easy to grab but now I'm stuck.
When trying multi line indication it either won't find anything or something is found somewhere but not in a block.
I have tried expressions like:

.*Compiling \d+ source files to .*\\xxxxxxxxxxxx\\bin.*javac.*\d+ errors.*

but that's too coarse.

Is some regex guru here to help me out?
Help would be highly appreciated.

Cheers
Jan

Jan Seidel

unread,
May 20, 2014, 8:36:56 AM5/20/14
to jenkins...@googlegroups.com
Just an addition.
The multiline seems not to work for me.

I would expect .* to take anything also in the next lines.

Shiran

unread,
Jul 19, 2017, 7:54:56 AM7/19/17
to Jenkins Users
Hi Jan,

Did it work eventually?
Please share, I'm in the same boat here.
Thanks :)
Reply all
Reply to author
Forward
0 new messages