Skip to content

Instantly share code, notes, and snippets.

@p404
Created May 24, 2015 23:31
Show Gist options
  • Save p404/a1f02bc062391044e4c0 to your computer and use it in GitHub Desktop.
Save p404/a1f02bc062391044e4c0 to your computer and use it in GitHub Desktop.
Jenkins Build Rails Proyect exec shell
#!/bin/bash -x
export RAILS_ENV=test
bundle install
read -d '' database_yml <<"EOF"
test:
adapter: postgresql
encoding: unicode
database: database_name
pool: 5
EOF
echo "$database_yml" > config/database.yml
rake db:create db:test:prepare
bundle exec rspec spec/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment