Created
February 9, 2012 13:58
-
-
Save jaikoo/1780144 to your computer and use it in GitHub Desktop.
Jenkins - Build - Execute Shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment