3 # This script is intended to only run inside Jenkins.
4 # https://ci.gitorious.org/jenkins/
6 cp config
/gitorious.sample.yml config
/gitorious.yml
7 cp config
/database.sample.yml config
/database.yml
8 sed -i 's/username:.*/username: gitorious/' config
/database.yml
9 sed -i 's/password:.*/password: gitorious/' config
/database.yml
10 # Optionally use a slave-specific database.
11 if [[ -n "$DATABASE" ]]; then
12 sed -i "s/database:.*/database: $DATABASE/" config
/database.yml
15 export GEM_HOME
=$HOME/.gems
17 export PATH
=$HOME/.gems
/bin
:$PATH
19 # Fix for Red Hat's old bundler package. When Red Hat updates to bundler 1.3,
21 sed -i 's/:ruby_20//' Gemfile
23 # Fix for https://groups.google.com/d/topic/gitorious/XG_WAWIZ8aA/discussion
30 bundle exec rake db:test:purge
31 bundle exec rake db:setup
32 COVERAGE=1 bundle exec "rake -f ci/stub.rake ci:setup:minitest test:units rcov"