天天看點

[Jenkins]詳解jenkins幾個有用的插件如何使用(emma,findbugs)

findbugs使用方式: 

目的:進行代碼走查的自動化,能夠提示垃圾代碼或者提供代碼優化的建議 

1.首先下載下傳findbugs 

http://findbugs.sourceforge.net/downloads.html 

2.其次在ant中配置findbugs 

http://www.51testing.com/?uid-265524-action-viewspace-itemid-200942 

3.再次在jenkins内下載下傳findbugs插件 

無需配置,如果是ant調用會在項目内自動生成findbugs.xml檔案并且在jenkins在繪制findbugs曲線 

emma使用方式: 

目的:進行測試代碼覆寫率檢查 

如果使用maven那麼隻要指定target目标位emma:emma即可 

如果使用ant那麼請繼續看 

1.首先下載下傳emma 

http://emma.sourceforge.net/downloads.html 

2.其次在ant中配置emma 

一個ant實用例子http://ouzhong.blog.hexun.com/32369273_d.html 

ibm ant-emma配置:http://www.ibm.com/developerworks/cn/java/j-lo-emma/ 

3.下載下傳emma-jenkins插件 

https://wiki.jenkins-ci.org/display/jenkins/emma+plugin 

其他做簡單介紹需要的時候可以使用: 

1.ant插件 

2.disk usage plugin  這個插件可以監控每次build項目所花費的實體空間 

3.thinbackup 這個插件可以備份你job的配置 

4.jenkins workspace cleanup plugin 這個插件可以再每次build之前清空workspace 

5.build-name-setter 這個插件可以設定每次build顯示的名字 

6.git插件  

7.pmd插件 這個插件 

8.python plugin 這個插件支援你像寫shell一樣寫python代碼 

9.email-ext plugin 這個插件提供你發送html格式的郵件 

10.hudson next build number plugin 如果你想把hudson每次build的版本号放到你的産品版本号中你可以使用這個插件 

11.html publisher plugin 支援html格式的report 

12.android lint plugin  支援android項目檢查 

13.copy artifact plugin  支援把build後産生的結果copy到其他項目去 

14.promoted 支援手工測試驗證,或者釋出産品,在build結束後手動執行 

15.jenkins description setter plugin  這個插件可以支援在job的描述修改,例如二維碼 

16.hudson port allocator plug-in  開啟關閉端口,或者選擇一個自由的端口來進行build 

17.android emulator plugin 

18.jobconfighistory plugin  這個插件用于檢視jobconfig曆史記錄 

19.jenkins sounds plugin  這個插件用于結束build後會給出聲音提示 

20.jira plugin  這個插件用來和jira配合使用