This page last changed on Dec 03, 2009 by csut017.

Rake Task

Executes Rake.

Version

Available from version 1.4

Examples

Minimalist example
<rake />
Full example
<rake>
  <executable>c:\ruby\bin\rake.bat</executable>
  <baseDirectory>c:\fromcvs\myrepo\myproject</baseDirectory>
  <buildArgs>additional-argument</buildArgs>
  <rakefile>Rakefile</rakefile>
  <targetList>
    <target>build</target>
  </targetList>
  <buildTimeoutSeconds>1200</buildTimeoutSeconds>
  <quiet>false</quiet>
  <silent>false</silent>
  <trace>true</trace>
</rake>

Configuration Elements

Element Description Type Required Default Version
baseDirectory The directory to run the Rake process in. If relative, is a subdirectory of the Project Working Directory. String No Project Working Directory 1.4
buildArgs Any arguments to pass through to Rake (e.g to specify build properties). String No None 1.4
buildTimeoutSeconds Number of seconds to wait before assuming that the process has hung and should be killed. Int32 No 600 1.4
description Description used for the visualisation of the buildstage, if left empty the process name will be shown. String No The task/publisher name. 1.5
dynamicValues The dynamic values to use for the task. Dynamic Values array No None 1.5
executable The path of the version of Rake you want to run. If this is relative, then must be relative to either (a) the base directory, (b) the CCNet Server application, or (c) if the path doesn't contain any directory details then can be available in the system or application's 'path' environment variable. String No c:\ruby\bin\rake.bat 1.4
quiet Do not log messages to standard output. Boolean No false 1.4
rakefile The name of the Rakefile to run, relative to the baseDirectory.
If no rake file is specified Rake will use the default build file in the working directory.
String No None 1.4
silent Like quiet but also suppresses the 'in directory' announcement. Boolean No false 1.4
targetList A list of targets to be called. CruiseControl.NET does not call Rake once for each target, it uses the Rake feature of being able to specify multiple targets.
If no targets are defined Rake will use the default target.
String array No None 1.4
trace Turns on invoke/execute tracing and enables full backtrace. Boolean No false 1.4

Notes

Accessing CruiseControl.NET build labels in Rake

CCNet will pass the current build label to Rake via the environment variable CCNetLabel. This means that you can access this variable too. For example, archive the build results in a folder with the same name as the build label (this is what we do on CCNetLive using NAnt. Here's some example Rakefile demonstrating how to do this:

#!ruby
            require 'rake'
            
            task :default => [:deploy]
            
            task :deploy do
            	publishdir="C:/download-area/CCNet-Builds/#{ENV['CCNetLabel']}"
            	mkdir_p publishdir
            	FileList['dist/*'].each do |file|
            		cp file, publishdir
            	end
            end

See Integration Properties for the values that are passed to the task.

Automatically Generated

Documentation generated on Thursday, 3 Dec 2009 at 8:52:17 AM

Document generated by Confluence on Jan 23, 2011 08:52