Newer
Older
- elasticsearch
- redis
POSTGRES_USER: portalmec
POSTGRES_PASSWORD: 123mudar
ELASTICSEARCH_URL: http://elasticsearch:9200
stages:
- test
- deploy
before_script:
- apt-get update -y
- apt-get install default-jre postgresql-client -y
- apt-get remove --purge --auto-remove redis-server -y
- apt-get install redis-server
# official way to provide password to psql: http://www.postgresql.org/docs/9.3/static/libpq-envars.html
- export PGPASSWORD=$POSTGRES_PASSWORD
- psql -h "postgres" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "SELECT 'OK' AS status;"
# gems
- gem install bundler
- bundle install --jobs $(nproc) --path=/cache/bundler
- bundle exec rake db:migrate:reset RAILS_ENV=test
tags:
- ruby
- postgres
- elasticsearch
- redis
#deploy:
# stage: deploy
# script:
# - mina deploy
# only:
# - master
# tags:
# - ruby
# - postgres
# - elasticsearch