Skip to content

Instantly share code, notes, and snippets.

@yonggu
Created June 6, 2013 09:47
Show Gist options
  • Save yonggu/5720456 to your computer and use it in GitHub Desktop.
Save yonggu/5720456 to your computer and use it in GitHub Desktop.
script for building rails project in Jenkins
#!/bin/bash -x
source ~/.bashrc
cd .
bundle install
read -d '' database_yml <<"EOF"
test:
adapter: postgresql
encoding: utf8
database: database
pool: 5
username: username
password: password
host: localhost
EOF
echo "$database_yml" > config/database.yml
bundle exec rake db:test:load RAILS_ENV=test
bundle exec rake RAILS_ENV=test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment