Last active
December 18, 2015 12:10
-
-
Save joxxoxo/5781181 to your computer and use it in GitHub Desktop.
jenkins_example
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 -x | |
source /var/lib/jenkins/.bash_profile | |
source /var/lib/jenkins/.bashrc | |
rvm use 1.9.3-p194-railsexpress@qwerty --create | |
bundle install | |
read -d '' database_yml <<"EOF" | |
login: &login | |
adapter: mysql2 | |
username: "foo" | |
password: "bar" | |
encoding: utf8 | |
test: &test | |
database: qwerty_jenkins_test | |
<<: *login | |
EOF | |
echo "$database_yml" > config/database.yml | |
bundle exec rake db:drop db:create RAILS_ENV=test | |
bundle exec rake db:structure:load RAILS_ENV=test | |
bundle exec rake db:migrate RAILS_ENV=test | |
bundle exec rake ci:setup:rspec spec RAILS_ENV=test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment