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
image: user/docker_image_name | |
pipelines: | |
branches: | |
'*': | |
- step: | |
script: | |
- export DATABASE_URL=postgresql://pg_user:pg_user_password@localhost/pipelines | |
- bundle exec rails db:schema:load RAILS_ENV=test | |
- /etc/init.d/postgresql restart | |
- /etc/init.d/postgresql status | |
- pg_lsclusters | |
- sudo -u postgres sh -c 'createdb external_database' | |
- sudo -u postgres psql -c "CREATE USER root WITH PASSWORD 'password'"; | |
- sudo -u postgres psql -c "ALTER USER root WITH SUPERUSER;" | |
- sudo -u postgres psql external_database < db/external_dump.sql | |
- sudo -u postgres psql external_database < db/external_database_seed_data.sql | |
- bundle exec rspec | |
services: | |
- postgres | |
definitions: | |
services: | |
postgres: | |
image: postgres | |
environment: | |
POSTGRES_DB: pipelines | |
POSTGRES_USER: pg_user | |
POSTGRES_PASSWORD: pg_user_password | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment