Rake Step
A Rake build step.
Example. Adds a simple Rake build step with default Ruby interpreter settings, launching parameters and test reporting.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
rake {
name = "My Rake step"
rakefile = file {
path = "build/Rakefile"
}
tasks = "mytask:test mytask:test2"
}
Content copied to clipboard }
}
Example. Adds a Rake build step with Rakefile script content and custom Rake parameters, custom Ruby interpreter settings, custom launching parameters and test reporting.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
rake {
name = "My Rake step"
workingDir = "project/"
rakefile = content {
content = """
// Rakefile content
// goes here ...
""".trimIndent()
}
tasks = "mytask:test mytask:test2"
rakeAdditionalParameters = "--trace"
rubyInterpreterMode = rvm {
rvmInterpreter = "jruby-1.4.0"
}
execBundle = false
trackInvokeExecuteStages = true
interpreterAdditionalParameters = "-J-Xmx512m"
enableTestUnit = false
enableTestSpec = true
enableShoulda = true
rspecSpecOptions = "user options"
cucumberOptions = "user options"
}
Content copied to clipboard }
}
See also
Properties
Optional collection of build step execution conditions
Rake will be invoked with a "CUCUMBER_OPTS={internal options} {user options}".
Whether to attach Cucumber framework results to Tests tab of the Build Results page.
Whether to attach RSpec framework results to Tests tab of the Build Results page.
Whether to attach Shoulda framework results to Tests tab of the Build Results page.
Whether to attach Test-Spec framework results to Tests tab of the Build Results page.
Whether to attach Test::Unit framework results to Tests tab of the Build Results page.
If your project uses the Bundler requirements manager and your Rakefile doesn't load the bundler setup script, this option will allow you to launch rake tasks using the bundle exec command emulation. If you want to execute bundle install command, you need to do it in the Command Line step before the Rake step. Also, remember to set up the Ruby environment configurator build feature to automatically pass Ruby interpreter to the command line runner.
Build step execution mode
Additional parameters for interpreter, useful for JRuby interpreters. E.g. '-J-Xmx512m'
Specified parameters will be added to rake command line.
Rake will be invoked with a "SPEC_OPTS={internal options} {user options}".
Whether to enable showing Invoke stage data in the build log.
Build working directory for ant script, specify it if it is different from the checkout directory.
Functions
Deletes all configured build step conditions
Configures build step conditions
Copies parameters of this object to the specified target
Use Ruby interpreter settings defined in the Ruby environment configurator build feature settings or the interpreter will be searched in the PATH.
Validates this object and reports found errors to the provided consumer