SVN不可用时,CruiseControl.NET构建失败 [英] CruiseControl.NET build fails when SVN is not available
问题描述
我们在外部托管了SVN存储库,而我们的构建服务器目前在内部。由于网络中断,超时或某些其他随机原因,有时(每天大约1次或2次)构建服务器无法找到SVN存储库。对于外部托管的存储库,这很难避免,但是当它找不到SVN存储库时,它将使构建失败!
We have an SVN repository hosted externally and our build server is currently internal. Occasionally (probably 1 or 2 times a day) the build server is unable to find the SVN repository due to a network outage, a timeout or some other random reason. With an externally hosted repository this is hard to avoid, however when it fails to find the SVN repository it fails the build!
我想找到一种解决方法只需在下一个时间间隔再试一次,然后忽略与未找到的存储库有关的任何错误。有人知道我该怎么做吗?
I would like to find a way for it to just try again at the next interval and ignore any errors relating to an unfound repository. Does anyone know how I can do this?
我在下面发布了我的配置供参考。
I have posted my config for reference below.
<project name="MyProject" queuePriority="0">
<workingDirectory>C:\RemovedForPost</workingDirectory>
<artifactDirectory>C:\RemovedForPost </artifactDirectory>
<sourcecontrol type="svn">
<trunkUrl>http://RemovedForPost \</trunkUrl>
<workingDirectory>source</workingDirectory>
<username>myuser</username>
<password>*****</password>
</sourcecontrol>
<triggers>
<intervalTrigger name="BuildAMinute" seconds="60" buildCondition="IfModificationExists" />
</triggers>
<tasks>
<msbuild>
<executable>C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
<workingDirectory>C:\RemovedForPost</workingDirectory>
<projectFile>C:\RemovedForPost\RemovedForPost.sln</projectFile>
<buildArgs>/noconsolelogger /p:Configuration=Debug /v:diag</buildArgs>
<targets>Build</targets>
<logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
<timeout>120</timeout>
</msbuild>
<nunit>
<path>C:\Program Files\NUnit 2.5\bin\net-2.0\nunit-console.exe</path>
<outputfile>C:\RemovedForPost.xml</outputfile>
<assemblies>
<assembly> RemovedForPost </assembly>
</assemblies>
<timeout>60</timeout>
</nunit>
</tasks>
谢谢
推荐答案
更正。您想要的所有内容都在新设置中
Correction. All of what you want is in the new settings
您可以将其设置为在设置最大重试次数之前不报告失败。因此,将max设置为3并将其设置为仅移动到达到极限的发布者(即,构建失败)单元。所以1或2次未击中就可以了,但是3次失败会使构建出问题。
You can set it to not report a failure until max retries is set. So make max at 3 and set it to only move onto the publisher (ie fail the build) unit it hits the limit. So 1 or 2 misses will be ok, but then 3 fail the build something is wrong.
这篇关于SVN不可用时,CruiseControl.NET构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!