CruiseControl.NET Infinite Loop on ForceBuild

85 Views Asked by At

I've been attempting to set up a project on CCNET that will only be built when someone forces it to be built (i.e., will not check for modifications). To do this, I wrote out the following definition in the ccnet.config file.

<project name="DummyPackagedProject-StagingRedeploy" description="Redeploys DummyPackagedProject after Staging Bump" queue="stageRedeploy">
  <state type="state" directory="$(BuildState)" />
  <artifactDirectory>$(BuildArt)\DummyPackagedProject-StagingRedeploy</artifactDirectory>
  <workingDirectory>$(BuildArt)\DummyPackagedProject</workingDirectory>
  <!-- No triggers; must be forced. -->

  <tasks>
    <devenv>
      <description>Build DummyPackagedProject</description>
      <executable>$(devenvexe)</executable>
      <solutionfile>$(BuildDir)\DummyPackagedProject\DummyPackagedProject.sln</solutionfile>
      <buildtype>Rebuild</buildtype>
      <configuration>Stage</configuration>
      <buildTimeoutSeconds>900</buildTimeoutSeconds>
    </devenv>
  </tasks>

  <publishers>
    <xmllogger />
    <artifactcleanup cleanUpMethod="KeepLastXBuilds" cleanUpValue="50" />
    <modificationHistory onlyLogWhenChangesFound="false" />
  </publishers>
</project>

(BuildArt, BuildDir, BuildState are globals pointing to specific directories, devenvexe is a global pointing to VS2013)

I took a look at the log file for CCNET itself (as opposed to the one generated for the project run), and it looks like once I trigger the Forcebuild, it performs the following:

  1. Gets added to the (empty) queue at position 0.
  2. Aquires a lock against our development queue.
  3. Picks up the build from the queue, finds no modifications.
  4. Triggers the build itself, begins building.
  5. Something puts another Forcebuild request on the queue in position 1.
  6. Step 5 is repeated, but it sees that a request is already on the queue, and it gets cancelled.
  7. Successfully finishes building.
  8. Releases the lock on our Development Queue.
  9. CCNET picks up that the project is in the queue, and starts the process over again (until I abort the build).

So I'm wondering if theres a way to figure out what is triggering the additional ForceBuilds. I'm the only one working with the project, and no other projects are set up to trigger a ForceBuild.

Any advice would be greatly appreciated.

EDIT: The following is the Processed output for the project config (Requested by Simon Laing):

<project>
  <askForForceBuildReason>None</askForForceBuildReason>
  <category />
  <artifactDirectory><BUILDART>\DummyPackagedProject-StagingRedeploy</artifactDirectory>
  <workingDirectory><BUILDART>\DummyPackagedProject</workingDirectory>
  <description>Redeploys DummyPackagedProject after Staging Bump</description>
  <externalLinks />
  <initialState>Started</initialState>
  <labeller type="defaultlabeller">
    <incrementOnFailure>False</incrementOnFailure>
    <initialBuildLabel>1</initialBuildLabel>
    <labelFormat>0</labelFormat>
    <postfix />
    <prefix />
    <labelPrefixFile />
    <labelPrefixFileSearchPattern />
  </labeller>
  <maxSourceControlRetries>5</maxSourceControlRetries>
  <modificationDelaySeconds>0</modificationDelaySeconds>
  <name>DummyPackagedProject-StagingRedeploy</name>
  <parameters />
  <prebuild />
  <publishers>
    <xmllogger>
      <dynamicValues />
      <environment />
    </xmllogger>
    <artifactcleanup>
      <cleanUpMethod>KeepLastXBuilds</cleanUpMethod>
      <cleanUpValue>50</cleanUpValue>
      <dynamicValues />
      <environment />
    </artifactcleanup>
    <modificationHistory>
      <dynamicValues />
      <environment />
      <onlyLogWhenChangesFound>False</onlyLogWhenChangesFound>
    </modificationHistory>
  </publishers>
  <queue>stageRedeploy</queue>
  <queuePriority>0</queuePriority>
  <security type="inheritedProjectSecurity" />
  <showForceBuildButton>True</showForceBuildButton>
  <showStartStopButton>True</showStartStopButton>
  <sourcecontrol type="nullSourceControl">
    <alwaysModified>False</alwaysModified>
    <failGetModifications>False</failGetModifications>
    <failGetSource>False</failGetSource>
    <failLabelSourceControl>False</failLabelSourceControl>
  </sourcecontrol>
  <sourceControlErrorHandling>ReportEveryFailure</sourceControlErrorHandling>
  <startupMode>UseLastState</startupMode>
  <state type="state">
    <directory><BUILDSTATE></directory>
  </state>
  <stopProjectOnReachingMaxSourceControlRetries>False</stopProjectOnReachingMaxSourceControlRetries>
  <tasks>
    <devenv>
      <buildTimeoutSeconds>900</buildTimeoutSeconds>
      <buildtype>Rebuild</buildtype>
      <configuration>Stage</configuration>
      <description>Build DummyPackagedProject</description>
      <dynamicValues />
      <environment />
      <executable>C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com</executable>
      <priority>Normal</priority>
      <project />
      <solutionfile><BUILDSRC>\DummyPackagedProject\DummyPackagedProject.sln</solutionfile>
    </devenv>
  </tasks>
  <triggers />
  <webURL>http://BUILDSERVER/ccnet</webURL>
  <writeSummaryFile>False</writeSummaryFile>
</project>
0

There are 0 best solutions below