Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CruiseControl.NET build fails when SVN is not available

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>

Thanks

like image 738
Odd Avatar asked Jul 21 '09 01:07

Odd


1 Answers

Correction. All of what you want is in the new settings

CruiseControl.NET docs

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.

like image 187
Alex Avatar answered Sep 23 '22 03:09

Alex