日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

CruiseControl日构建简单配置

發布時間:2025/3/19 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 CruiseControl日构建简单配置 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

CruiseControl使用筆記

本文所用cruisecontrol版本是2.8。

1.?日構建配置

日構建是指在每天指定的時間進行構建。

1.1.?<Project>

requireModification?設為?false,含義是無論有沒有變化,都要進行構建。

1.2.?<Listener>

????<listeners>

??????<currentbuildstatuslistener?file="logs/${project.name}/status.txt"/>

</listeners>

如果沒有設置,?那么dashboard上的status將是空,但并不影響大局,一般就如上配置。

1.3.?<bootstrappers>

Bootstrappers配置了檢查變更前的任務,也在Schedule中的任務之前。這里要完成schedule中任務所依賴的文件的更新。

比如

<bootstrappers>

??<tfsbootstrapper?itemSpec=“[vstsworkspace]/[setuppath]/build.xml?/>

</bootstrappers>

而cruisecontol給出的connectfour例子:

<bootstrappers>

????????????<antbootstrapper?anthome="apache-ant-1.7.0"?buildfile="projects/${project.name}/build.xml"?target="clean"?/>

</bootstrappers>

實際上沒有必要,大可放到?schedule中的任務中。

1.4.?<modificationset>

對于日構建,這其實是不需要的,但由于cc必須要1個mondification,可以配一個無效。兩個建議:

1,配成檢查本機某個目錄,這個目錄不需要變化;?

????<modificationset?>

??????<filesystem?folder="D:/WWS/JJJ"/>

????</modificationset>

2,配成timebuild

????<modificationset?>

??????<timebuild?time="1200"?/>

</modificationset>

這與schedule中的time配置有所沖突,shedule中任務的time設置后,此設置無效。

1.5.?<schedule?>

屬性interval?是設置檢查更新的間隔秒數。如果下面的任務配置了?time,這個屬性會變得無效。

對于日構建任務,建議只設置一個,首選ant任務,全部要完成的動作在ant的build.xml中。

例:

???<schedule?interval="300">

??????<ant?anthome="apache-ant-1.7.0"?buildfile="projects/${project.name}/build.xml"?time="2112"?/>

</schedule>

Build.xml中處理了獲取代碼、編譯、測試、打包、發布等等任務。

1.6.?<log>

如果采用了ant中junit任務,可以用下面語句合并日志。

????<log>

??????<merge?dir="projects/${project.name}/target/test-results"/>

????</log>

1.7.?<publishers>

主要配置email通知。配置簡單,按說明即可。要注意的是,在force?build時,缺省地存在名為"User"的用戶,在發送列表中,但"User"不是一個有效的email,因此加入"User"的別名來解決這個問題。示例如下:

????<publishers>

??????<htmlemail?buildresultsurl="http://xx"?mailhost="smtphost"?username="xxx"?password="xxx"?returnaddress="xxx@yyy.com">

????????<map?alias="User"?address="xxxuser@gmail.com"?/>

?????????<always?address="xxxxx@hotmail.com"?/>

????????

??????</htmlemail>

????</publishers>

對于項目群匯總報告,建議采用?<http>

也可以將build.xml中最后的發布任務放到這里。比如

<publishers>

<onsuccess>

????<antpublisher?antscript="C:/Java/apache-ant-1.6.1/bin/ant.bat"

?????????antworkingdir="D:/workspace/MyProject"

?????????buildfile="build.xml"

?????????target="publish">

?????</antpublisher>

</onsuccess>

</publishers>

總結

以上是生活随笔為你收集整理的CruiseControl日构建简单配置的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。