# Official docker image.
image: docker:latest

services:
  - docker:dind

variables:
  DOCKER_DRIVER: overlay

before_script:
  - apk update
  - apk upgrade
# As CI docker image is based on alpine and we generate lock file outside of docker
# We need system libraries required for pip dependencies
  - apk add python3 python3-dev build-base git postgresql-dev
  - pip3 install docker-compose
  - pip3 install -U pip pipenv==2018.11.26 setuptools wheel
  - pipenv install --system --ignore-pipfile
  - git config --global user.email "foo@bar.baz"
  - git config --global user.name "Foo Bar"
# See the following issue for reasoning: https://gitlab.com/gitlab-org/gitlab-ce/issues/41227
  - export SHARED_PATH="$(dirname ${CI_PROJECT_DIR})/shared"
  - export TPL_PLAYGROUND="${SHARED_PATH}/tpl-playground"
  - mkdir -p $TPL_PLAYGROUND

build:
  stage: build
  script:
    - pytest --maxfail=1 -v

# Official docker image.
image: docker:latest

services:
  - docker:dind

variables:
  DOCKER_DRIVER: overlay

before_script:
  - apk update
  - apk upgrade
# As CI docker image is based on alpine and we generate lock file outside of docker
# We need system libraries required for pip dependencies
  - apk add python3 python3-dev build-base libffi-dev openssl-dev git postgresql-dev
  - pip3 install docker-compose
  - pip3 install -U pip pipenv==2018.11.26 setuptools wheel
  - pipenv install --system --ignore-pipfile
  - git config --global user.email "foo@bar.baz"
  - git config --global user.name "Foo Bar"
# See the following issue for reasoning: https://gitlab.com/gitlab-org/gitlab-ce/issues/41227
  - export SHARED_PATH="$(dirname ${CI_PROJECT_DIR})/shared"
  - export TPL_PLAYGROUND="${SHARED_PATH}/tpl-playground"
  - mkdir -p $TPL_PLAYGROUND

build:
  stage: build
  script:
    - pytest --maxfail=1 -v

Fix Docker Compose install in pipeline
Fix Docker Compose install in pipeline
