Our Build Server is separate from our SourceSafe Server. During our Daily Build process, from time to time, the Build machine will be unable to get access to the SourceSafe server to check code in or check code out. In my CheckIn tasks, I have the attribute failonerror="true". This causes my entire build process to fail (which takes about 25 minutes) and I have to start all the tasks over again.
<vsscheckin
user="${username}"
password="${password}"
localpath="${projectpath}/SolutionInfo.vb"
recursive="true"
writable="false"
dbpath="${ssdbpath}"
path="${ssrootprojectname}/SolutionInfo.vb"
failonerror="true"
comment="Build
Label : ${sslabel}"/>
I have found out about
the new <trycatch> task from NAntContrib, which works well, but I can't
seem to put together a clean solution where I can perform some type of loop to where I can attempt to check things into
my database n number of times before I finally quit the build
process. Does anyone have any ideas how to pull this
off?
<do
until ${database.failed}>
<trycatch >
<try>
<vsscheckin
user="${username}"
password="${password}"
localpath="${projectpath}/SolutionInfo.vb"
recursive="true"
writable="false"
dbpath="${ssdbpath}"
path="${ssrootprojectname}/SolutionInfo.vb"
failonerror="true"
comment="Build Label : ${sslabel}"/></try>
<catch property="failure"><if $(failure}="failed to open database \\Build\vss\Fish\srcsafe.ini"<property name="database.failure" value="true"/><property name="database.failure.count" value="1"/><if.></catch>
<finally>
<if test="${property::exists('database.open.failure')}">
<echo message="Error was a Database Open Failure" />
</if><if test="${property::('database.failure.count').count > 3}">
<property name="database.failed" value="true"/></if>
</finally>
</trycatch><do/>Thanks,Chris