0

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>
jdg9833
  • 1
  • 2
  • If you use the CCValidator.exe, what do you see as the processed output for this config? You should be able to find it in the same directory as ccnet.exe and ccnet.config – Simon Laing May 09 '16 at 20:03
  • And for completeness which version of ccnet are you using, is it 1.4.3 or later? See http://cruisecontrolnet.org/projects/ccnet/wiki/Trigger_Blocks – Simon Laing May 10 '16 at 16:57
  • It does state that an empty trigger block means manual builds only. – Simon Laing May 10 '16 at 16:58
  • The latest build log should include the reason for the build, are you able to find this and include this in the question? Look for CCNetRequestSource – Simon Laing May 10 '16 at 17:00
  • we're using version 1.8.5.0. I didn't see a line in the log for CCNetRequestSource, this is the closest I could get: `2016-04-27 17:25:53,957 [6:INFO] Project: 'DummyPackagedProject-StagingRedeploy' is added to queue: 'stageRedeploy' in position 0. Requestsource : BUILDSERVER ()` – jdg9833 May 10 '16 at 17:20
  • It should be in the log for the build, the .XML log file. You should be able to find it via the dashboard, or in the artifacts directory. – Simon Laing May 10 '16 at 17:35
  • Ahh, I was looking in the wrong place. the value it has is: `` not sure if this is applicable, but it also exists here `Build (ForceBuild) triggered from BUILDSERVER` – jdg9833 May 10 '16 at 19:28

0 Answers0