Dashboard > CruiseControl.NET > ... > Task Blocks > File Merge Task
File Merge Task Log In View a printable version of the current page.  
CruiseControl.NET documentation for latest CI builds
Added by Owen Rogers , last edited by Graham Tackley on Aug 15, 2005  (view change)

Most build processes interact with external tools that write their output to file (eg. NUnit or FxCop or NCover). In order to make the output of these tools available to CruiseControl.NET to be used in the build process or displayed in the CCNet web page or included in CCNet emails, these files need to be merged into the CCNet integration.

To merge these files, you need to include a File Merge Task in your CCNet project. To do so, you need to modify your ccnet.config file as follows:

<cruisecontrol>
   <project name="project">
      ...
      <publishers>
         <merge>
             <files>
                  <file><!-- path to NUnit test file --></file>
                  <file><!-- path to FxCop file --></file>
             </files>
         </merge>
      </publishers>
   </project>
</cruisecontrol>
You should place your File Merge Tasks in the <publishers /> section of your Project Configuration Block before your Xml Log Publisher.

Modify the contents of the <files> element to contain the path of the files that you wish to merge. The file can be specified using an asterisk ("*") wildcard in order to include multiple files that match the specified pattern (ie. "*-results.xml" will merge all files ending with the suffix "-results.xml"). The asterisk wildcard can only be used in the filename, not in the path.

If a relative <file> location is specified, this is relative to the Project Working Directory.

Why are the merged results not showing up in the [Project Report Web Application]?

If you have set up the configuration for the File Merge Task as described above and you are still not ending up with the appropriate results showing up within the web application, please try the following steps:

  1. Click the orginal log link and check to see if the merged content is included in the xml. If it is missing then got onto step 2. If it is present and is still not showing up in the web page then try emailing the CCNet users list .
  2. Have you put the File Merge Tasks in the <publishers /> section of your Project Configuration Block before your Xml Log Publisher?
  3. Check the folder that contains the files that should be merged. If they are not there then you need to dig into your build script to find out why they aren't getting created.
  4. If the files are there but aren't getting merged, double-check your ccnet.config file. Is the Xml specified correctly as specified above? Remember case matters.
  5. Check the ccnet.log file. You should see Info-level log messages stating that the files have been merged.

It would be nice to define new tag where file should be merged.

<file tag="MyTag">MyFile1.xml</file>
<file tag="MyTag" useExist="true">MyFile2.xml</file>

Both file will be merged to <MyTag></MyTag>
And second won't be create new <MyTag></MyTag>, it will be added inside.

In such way it is possible correctly to add new modification or anything else to existent tags.
It could be usefull if you cant directly control output files.

Powered by a free Atlassian Confluence Open Source Project / Non-profit License granted to ThoughtWorks, Inc.. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators