public
Created

Jenkins - Build - Execute Shell

  • Download Gist
gistfile1.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#!/bin/bash
read -d '' database_yml <<"EOF"
login: &login
adapter: mysql2
host: localhost
username: root
encoding: utf8
collation: utf8_general_ci
 
test: &test
database: your_db_name
<<: *login
EOF
 
echo "$database_yml" > config/database.yml
 
source "/usr/local/rvm/scripts/rvm"
rvm use 1.9.3
export RAILS_ENV=test
bundle
rake db:create
rake db:migrate
rake db:test:prepare
rake spec

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.