image: osul/centos6-ruby:2.3

before_script:
  # Configure SSH deployment key inside docker image
  - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
  - eval $(ssh-agent -s)
  - ssh-add <(echo "$SSH_PRIVATE_KEY")
  - mkdir -p ~/.ssh
  - '[[ -f /.dockerinit ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'

  # Install dependencies
  - ruby -v
  - which ruby
  - bundle install --jobs $(nproc) "${FLAGS[@]}"

  # Set up environment
  - bundle exec rake db:schema:load
  - bundle exec rake db:test:prepare

rspec:
  script:
    - xvfb-run -a bundle exec rake spec

image: osul/centos7-ruby:2.3

before_script:
  # Configure SSH deployment key inside docker image
  - eval $(ssh-agent -s)
  - ssh-add <(echo "$SSH_PRIVATE_KEY")
  - mkdir -p ~/.ssh
  - '[[ -f /.dockerinit ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'

  # Install dependencies
  - ruby -v
  - which ruby
  - bundle install --jobs $(nproc) "${FLAGS[@]}"

  # Set up environment
  - bundle exec rake db:schema:load
  - bundle exec rake db:test:prepare

rspec:
  script:
    - xvfb-run -a bundle exec rake spec

Use Centos 7 docker image base
Use Centos 7 docker image base
