星期五, 7月 06, 2012

CuriseControl.Net 初步安裝

CuriseControl.Net 環境準備

安裝

檔案下載

安裝

參考 安裝文件

ccnet.config 設定

檔案在安裝目錄下的 server 目錄
<project name="CCNetTest" queue="TestQueue" queuePriority="1">
    <workingDirectory>C:\projects\CCNetTest</workingDirectory>
    <artifactDirectory>c:\projects\CCNetTest_Logs</artifactDirectory>

    <!-- Source Control -->
    <sourcecontrol type="vsts" autoGetSource="true" force="true">
        <server>***</server>
        <project>***</project>
        <workspace>***</workspace>
        <domain>***</domain>
        <username>*****</username>
        <password>*****</password>
        <timeout>60000</timeout>
    </sourcecontrol>

    <!-- Trigger -->
    <triggers>
        …     
    </triggers>

    <tasks>
        …     
    </tasks>
</project>

Source Control

<sourcecontrol type="vsts" autoGetSource="true" force="true">
    <server>*****</server>
    <project>*****</project>
    <workspace>*****</workspace>
    <domain>*****</domain>
    <username>*****</username>
    <password>*****</password>
    <timeout>60000</timeout>
    <codepage>950</codepage>
</sourcecontrol>
注意事項:
  • workspace 請事先利用工具建立
  • 如果需要每次下載都是乾淨的,加入設定 <cleanCopy>true</cleanCopy>
  • 如果是中文環境,要加入 codepage,避免下載更新檔案發生日期格式錯誤的問題

Trigger

設定觸發的時間與條件
<intervalTrigger name="Download Sources" seconds="60" buildCondition="IfModificationExists" />
名稱可自行定義。 目前 bulidCondition 有三種,用來觸發 Build Task。
  • NoBuild - 不做 Build
  • IfModificationExists - 當程式碼有變更的時候,會觸發條件,下載程式並重新 Build
  • ForceBuild - 強制每次都做 Build
Powered By Blogger