代码改变世界

CruiseControl.NET with svn over SSH

2010-03-01 16:56  敏捷的水  阅读(941)  评论(0编辑  收藏  举报

1. 配置cc service config

<project name="SVNTest">
        <workingDirectory>D:\dailybuild\SVNTest</workingDirectory>
        <artifactDirectory>D:\dailybuild\SVNTest</artifactDirectory>
        <category>livebookings</category>
        <sourcecontrol type="svn">
            <executable>C:\Program Files\SlikSvn\bin\svn.exe</executable>           
            <trunkUrl>https://125.206.32.1/svn/repo/testproject/trunck</trunkUrl>           
            <username>svnname</username>
            <password>svnpassword</password>
            <workingDirectory>D:\dailybuild\SVNTest</workingDirectory>
            <autoGetSource>true</autoGetSource>           
        </sourcecontrol>
        <tasks>
            <msbuild>
                <executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
                <workingDirectory>D:\dailybuild\SVNTest\Source\</workingDirectory>
                <projectFile>Test.sln</projectFile>
                <logger>D:\dailybuild\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
                <targets>Build</targets>
                <timeout>900</timeout>
            </msbuild>
            <buildpublisher>
                <sourceDir>D:\dailybuild\SVNTest\Source\Test.Web</sourceDir>
                <publishDir>D:\dailybuild\publish\SVNTest\</publishDir>
                <useLabelSubDirectory>false</useLabelSubDirectory>
            </buildpublisher>
        </tasks>
        <triggers>
        </triggers>
        <labeller type="defaultlabeller">
            <prefix>LB-SVNTest-</prefix>
            <incrementOnFailure>true</incrementOnFailure>
        </labeller>
    </project>

2. 安装SlikSvn

进入C:\Program Files\SlikSvn\bin\svn.exe

svn list https://125.206.32.1/svn/repo/testproject/trunck

出现证书提示时,选永久保存

image

3. 执行上面命令的用户要和运行cc service的用户一致。

4. 如果还不行

C:\Program Files\SlikSvn\bin>schtasks /create /tn "My App" /tr cmd.exe /sc once
/st 14:46:00 /sd 2010/03/01

启动命令行,执行上面几步的命令。