ccnet+web deploy远程发布
<cruisecontrol xmlns:cb="urn:ccnet.config.builder">
<project>
<name>Test</name>
<labeller type="defaultlabeller">
<prefix>Test-1-</prefix>
<incrementOnFailure>false</incrementOnFailure>
<labelFormat>00000</labelFormat>
</labeller>
<webURL>http://localhost/ccnet/server/local/project/Test/ViewProjectReport.aspx</webURL>
<triggers>
<intervalTrigger seconds="60"/>
</triggers>
<modificationDelaySeconds>2</modificationDelaySeconds>
<sourcecontrol type="svn">
<trunkUrl>http://10.2.3.23:81/svn/Test</trunkUrl>
<executable>C:/Program Files (x86)/VisualSVN Server/bin/svn.exe</executable>
<username>XXX</username>
<password>XXXXXX</password>
</sourcecontrol>
<tasks>
<msbuild>
<executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>C:\Program Files (x86)\CruiseControl.NET\server\Test\WorkingDirectory</workingDirectory>
<projectFile>Test.sln</projectFile>
<buildArgs></buildArgs>
<logger>C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
<targets>Build</targets>
</msbuild>
<exec executable="C:\test.bat" />
<exec executable="C:\deploy.bat" />
</tasks>
<publishers>
<buildpublisher>
<sourceDir>C:\Program Files (x86)\CruiseControl.NET\server\Test\WorkingDirectory</sourceDir>
<publishDir>C:\Program Files (x86)\CruiseControl.NET\server\Test\HistoryVersion</publishDir>
</buildpublisher>
<merge>
<files>
<file>C:\Program Files (x86)\CruiseControl.NET\server\Test\WorkingDirectory\results.xml</file>
</files>
</merge>
<xmllogger/>
<modificationHistory/>
<statistics/>
<email mailhost="smtp.qq.com" mailport="25" mailhostUsername="XXXXXX@qq.com" mailhostPassword="XXXXXX" from="XXXXXX@qq.com" includeDetails="true">
<users>
<user name="wxm" group="Test" address="XXXXXX@qq.com" />
</users>
<groups>
<group name="Test" notification="always" />
</groups>
</email>
</publishers>
</project>
</cruisecontrol>
test.bat 文件
msbuild "C:\Program Files (x86)\CruiseControl.NET\server\Test\WorkingDirectory\Test\Test.csproj" /t:Package
deploy.bat
msdeploy -source:contentpath="C:\Program Files (x86)\CruiseControl.NET\server\Test\WorkingDirectory\Test\obj\Debug\Package\PackageTmp\" -dest:contentpath="c:\deploy",includeAcls=false,computername="https://localhost:8090/msdeploy.axd?Site=Test",authType=Basic,userName=administrator,password=pass@word1 -allowUntrusted -verb:sync
此时将msbuild和msdploy的安装路径已加入环境变量