stages:
  - e2e-test

e2e-testing:
  image:
    name: docker/compose:1.24.0
    entrypoint: ['/bin/sh', '-c']
  services:
    - docker:dind
  stage: e2e-test
  tags: ['compose']
  only:
    - testing
  before_script:
    - echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USER" --password-stdin
  script:
    - docker image prune -f
    - docker-compose build --no-cache
    - docker-compose up -d
  after_script:
    - docker logout
