ccnet +msbuild +svn 每日构建(二 )编译完成后自动发布并部署文件
<cruisecontrol>
<project>
<webURL>http://127.0.0.1/ccnet/ViewFarmReport.aspx</webURL>
<name>test4</name>
<sourcecontrol type="svn" autoGetSource="true">
<trunkUrl>https://luyifeng.corp.ganji.com:8443/svn/helloword/test-svn/MvcApplication1/trunk/</trunkUrl>
<executable>D:\Program Files (x86)\VisualSVN Server\bin\svn.exe</executable>
<workingDirectory>E:\DailyBuild\mvctest1</workingDirectory>
<username>luyifeng</username>
<password>luyifeng1</password>
</sourcecontrol>
<tasks>
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>E:\DailyBuild\mvctest1</workingDirectory>
<projectFile>MvcApplication1.sln</projectFile>
<logger>D:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
<targets>Build</targets>
<timeout>1900</timeout>
<buildArgs></buildArgs>
</msbuild>
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>D:\Soft\ccnet\test-svn\MvcApplication1\MvcApplication1</workingDirectory>
<projectFile>MvcApplication1.csproj</projectFile>
<logger>D:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
<targets>_WPPCopyWebApplication</targets>
<timeout>900</timeout>
<buildArgs>/p:Platform=AnyCPU;Configuration=Debug;WebProjectOutputDir=E:\DailyBuild\mvc_test_publish /v:m</buildArgs>
</msbuild>
-----在ccnet +msbuild +svn 每日构建( 一 ) 的基础上增加此条配置,基本不用多说,看配置就能明白大概意思
----大体意思是:编译解决方案里面的web项目,并通过WebProjectOutputDir=E:\DailyBuild\mvc_test_publish发布到指定的目录,
---比如说测试环境的iis目录,这样就不用手动部署测试环境了,非常方便完成测试环境搭建
---但是这样会有一个问题,如果每次编译完成自动发布到测试环境的iis目录,会导致测试环境经常部署重启,进而导致测试同学无法正常工作
---下一篇将解决这个问题,说明如何在编译完成后不进行自动部署到iis测试环境