我对我在CruiseControl.Net构建日志中看到的结果感到有些困惑。几分钟后构建失败,但我无法弄清楚是什么导致它。
<cruisecontrol project="Bromley Live">
<request source="ITUSER-PC" buildCondition="ForceBuild">Build (ForceBuild) triggered from ITUSER-PC</request>
<parameters>
<parameter name="CCNetForceBuildReason" value="Debugging" />
<parameter name="$CCNetArtifactDirectory" value="C:\CCNet\Projects\Bromley Live\Artifacts" />
<parameter name="$CCNetBuildCondition" value="ForceBuild" />
<parameter name="$CCNetBuildDate" value="2011-06-02" />
<parameter name="$CCNetBuildTime" value="14:34:38" />
<parameter name="$CCNetFailureUsers" value="System.Collections.ArrayList" />
<parameter name="$CCNetIntegrationStatus" value="Unknown" />
<parameter name="$CCNetLabel" value="1.0.0.0" />
<parameter name="$CCNetLastIntegrationStatus" value="Failure" />
<parameter name="$CCNetListenerFile" value="C:\CCNet\Projects\Bromley Live\Artifacts\Bromley Live_ListenFile.xml" />
<parameter name="$CCNetModifyingUsers" value="System.Collections.ArrayList" />
<parameter name="$CCNetNumericLabel" value="0" />
<parameter name="$CCNetProject" value="Bromley Live" />
<parameter name="$CCNetProjectUrl" value="http://CIBuildServer/CruiseControl/server/local/project/Bromley Live/ViewProjectReport.aspx" />
<parameter name="$CCNetRequestSource" value="OCL-DEV-WEB" />
<parameter name="$CCNetUser" value="" />
<parameter name="$CCNetWorkingDirectory" value="C:\CCNet\Projects\Bromley Live\WorkingDirectory" />
</parameters>
<modifications />
<integrationProperties>
<CCNetArtifactDirectory>C:\CCNet\Projects\Bromley Live\Artifacts</CCNetArtifactDirectory>
<CCNetBuildCondition>ForceBuild</CCNetBuildCondition>
<CCNetBuildDate>2011-06-02</CCNetBuildDate>
<CCNetBuildTime>14:34:38</CCNetBuildTime>
<CCNetFailureUsers />
<CCNetIntegrationStatus>Failure</CCNetIntegrationStatus>
<CCNetLabel>1.0.0.0</CCNetLabel>
<CCNetLastIntegrationStatus>Failure</CCNetLastIntegrationStatus>
<CCNetListenerFile>C:\CCNet\Projects\Bromley Live\Artifacts\Bromley Live_ListenFile.xml</CCNetListenerFile>
<CCNetModifyingUsers />
<CCNetNumericLabel>0</CCNetNumericLabel>
<CCNetProject>Bromley Live</CCNetProject>
<CCNetProjectUrl>http://CIBuildServer/CruiseControl/server/local/project/Bromley Live/ViewProjectReport.aspx</CCNetProjectUrl>
<CCNetRequestSource>ITUSER-PC</CCNetRequestSource>
<CCNetWorkingDirectory>C:\CCNet\Projects\Bromley Live\WorkingDirectory</CCNetWorkingDirectory>
<LastIntegrationStatus>Failure</LastIntegrationStatus>
<LastSuccessfulIntegrationLabel>UNKNOWN</LastSuccessfulIntegrationLabel>
<LastModificationDate>01/06/2011 14:35:34</LastModificationDate>
<CCNetForceBuildReason>Debugging</CCNetForceBuildReason>
</integrationProperties>
<build date="2011-06-02 14:34:38" buildtime="00:00:56" error="true" buildcondition="ForceBuild">
<buildresults>
<message>The command completed successfully.</message>
</buildresults>
<buildresults>
<message>-------------------------------------------------------------------------------</message>
<message> ROBOCOPY :: Robust File Copy for Windows </message>
<message>-------------------------------------------------------------------------------</message>
<message> Started : Thu Jun 02 14:34:38 2011</message>
<message> Source : C:\CCNet\Projects\Bromley Live\WorkingDirectory\Website\</message>
<message> Dest : \\LiveServer\wwwroot$\Bromley\</message>
<message> Files : *.*</message>
<message> </message>
<message>Exc Files : Thumbs.db</message>
<message> *.scc</message>
<message> </message>
<message> Exc Dirs : .hg</message>
<message> </message>
<message> Options : *.* /NS /NC /NDL /S /E /COPY:DAT /NP /XO /XA:H /R:1000000 /W:30 </message>
<message>------------------------------------------------------------------------------</message>
<message> \\LiveServer\wwwroot$\Bromley\admin\legacy\selfAssessment\uploadVisitReport.asp</message>
<message> \\LiveServer\wwwroot$\Bromley\Bin\AjaxControlToolkit.pdb</message>
<message> C:\CCNet\Projects\Bromley Live\WorkingDirectory\Website\userControls\IconMenuTopControl.ascx</message>
<message> C:\CCNet\Projects\Bromley Live\WorkingDirectory\Website\userControls\IconMenuTopControl.ascx.vb</message>
<message>------------------------------------------------------------------------------</message>
<message> Total Copied Skipped Mismatch FAILED Extras</message>
<message> Dirs : 212 0 212 0 0 16</message>
<message> Files : 1804 45 1759 0 0 203</message>
<message> Bytes : 44.46 m 2.89 m 41.57 m 0 0 2.03 m</message>
<message> Times : 0:00:55 0:00:16 0:00:00 0:00:39</message>
<message> Speed : 185068 Bytes/sec.</message>
<message> Speed : 10.589 MegaBytes/min.</message>
<message> Ended : Thu Jun 02 14:35:34 2011</message>
</buildresults>
</build>
</cruisecontrol>
答案 0 :(得分:5)
Robocopy不会返回正确的退出状态代码(即成功时为0)。要解决此问题,您必须使用executable task上的successExitCodes
属性。将其设置为“0,1,2”应该有效(您希望任务在其他结果上失败)。 (Robocopy exit codes list作为参考。)