Skip to content

Instantly share code, notes, and snippets.

@doxavore
Forked from miry/RailsTemplate.xml
Created November 18, 2013 21:15
Show Gist options
  • Save doxavore/7535426 to your computer and use it in GitHub Desktop.
Save doxavore/7535426 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE template SYSTEM "../../../project-config.dtd">
<template>
<name>Rails</name>
<settings>
<options>
<option name="executionTimeoutMin" value="20" />
</options>
<parameters>
<param name="db.adapter" value="postgresql" />
<param name="db.password" value="ci" />
<param name="db.port" value="5432" />
<param name="db.username" value="ci" />
<param name="env.DISPLAY" value=":99" />
<param name="env.RAILS_ENV" value="test" />
</parameters>
<build-runners>
<runner id="RUNNER_6" name="Run X server" type="simpleRunner">
<parameters>
<param name="script.content" value="Xvfb %env.DISPLAY% -ac -screen 0 1024x768x8 &amp;" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
</runner>
<runner id="RUNNER_4" name="Init DB config" type="simpleRunner">
<parameters>
<param name="script.content"><![CDATA[cat > config/database.yml <<EOF
test:
adapter: %db.adapter%
database: %teamcity.project.id%
pool: 5
username: %db.username%
password: %db.password%
host: localhost
port: %db.port%
concurrent: false
EOF]]></param>
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
</runner>
<runner id="RUNNER_3" name="Install Ruby" type="simpleRunner">
<parameters>
<param name="script.content" value="rvm list | grep %rvm.ruby% || rvm install %rvm.ruby%" />
<param name="teamcity.step.mode" value="default" />
<param name="use.custom.script" value="true" />
</parameters>
</runner>
<runner id="RUNNER_2" name="Bundle" type="simpleRunner">
<parameters>
<param name="command.executable" value="bundle" />
<param name="command.parameters" value="install --binstubs" />
<param name="script.content" value="bundle install" />
<param name="teamcity.step.mode" value="default" />
</parameters>
</runner>
<runner id="RUNNER_5" name="Setup DB tables" type="rake-runner">
<parameters>
<param name="teamcity.step.mode" value="default" />
<param name="ui.rakeRunner.bunlder.exec.enabled" value="true" />
<param name="ui.rakeRunner.config.version" value="2" />
<param name="ui.rakeRunner.rake.tasks.names" value="db:drop db:create db:migrate" />
<param name="ui.rakeRunner.ruby.use.mode" value="default" />
</parameters>
</runner>
<runner id="RUNNER_1" name="Run tests" type="rake-runner">
<parameters>
<param name="teamcity.step.mode" value="default" />
<param name="ui.rakeRunner.bunlder.exec.enabled" value="true" />
<param name="ui.rakeRunner.config.version" value="2" />
<param name="ui.rakeRunner.rake.tasks.names" value="test" />
<param name="ui.rakeRunner.ruby.rvm.sdk.name" value="%rvm.ruby%" />
<param name="ui.rakeRunner.ruby.use.mode" value="default" />
</parameters>
</runner>
</build-runners>
<vcs-settings checkout-mode="ON_SERVER" labeling-type="NONE" labeling-pattern="build-%system.build.number%" />
<requirements />
<build-triggers />
<build-extensions>
<extension id="ruby.env.configurator" type="ruby.env.configurator">
<parameters>
<param name="ui.ruby.configurator.rbenv.file.path" value=".rbenv-version" />
<param name="ui.ruby.configurator.rvm.gemset.create.if.non.exists" value="true" />
<param name="ui.ruby.configurator.rvm.gemset.name" value="%rvm.gemset%" />
<param name="ui.ruby.configurator.rvm.path" value="%env.rvm_path%" />
<param name="ui.ruby.configurator.rvm.rvmrc.path" value=".rvmrc" />
<param name="ui.ruby.configurator.rvm.sdk.name" value="%rvm.ruby%" />
<param name="ui.ruby.configurator.use.rvm" value="manual" />
</parameters>
</extension>
</build-extensions>
<cleanup />
</settings>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment