在初學使用Jenkins的同學們,應該都遇到過通過bash或者cmd命令執行輸出的日志,沒辦法做到對error, warning等狀態的分析和統計。在這里就給他介紹一款實現此功能的插件Log Parse。此插件安裝相當容易,但配置規則文件時,我踩了一坑,記錄共享于同學們。
規則文件絕對路徑

當然,你的設置一定要重新加載,否則是無效的
規則文件相對路徑:
在windows平臺下,默認的根目錄為C:\Windows\.SysWOW64\,所以需要把規則文件放到此目錄下。
常用規則文件代碼如下:
ok /not really/ # match line starting with 'error ', case-insensitive error /error / # list of warnings here... warning /[Ww]arning/ warning /WARNING/ # create a quick access link to lines in the report containing 'INFO' info /INFO/ # each line containing 'BUILD' represents the start of a section for grouping errors and warnings found after the line. # also creates a quick access link. start /BUILD/
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持億速云。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。