---

machine:
  services:
    - docker
  environment:
    TERM: dumb

checkout:
  post:
    - "if [ -e .git/shallow ]; then git fetch --unshallow; fi"
    - git fetch --tags
    - git submodule update --init --remote

dependencies:
  override:
    - docker info
    - docker build -t dmdirc/ansibletest docker

test:
  override:
    - docker run -v $PWD/ansible:/opt/ansible -v $PWD/ansible/vars/testing:/opt/ansible/vars/private -t dmdirc/ansibletest


---

machine:
  services:
    - docker
  environment:
    TERM: dumb

checkout:
  post:
    - "if [ -e .git/shallow ]; then git fetch --unshallow; fi"
    - git fetch --tags
    - git submodule update --init --remote

dependencies:
  cache_directories:
    - ~/docker
  override:
    - docker info
    - if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
    - docker build -t dmdirc/ansibletest docker
    - mkdir -p ~/docker; docker save dmdirc/ansibletest > ~/docker/image.tar

test:
  override:
    - docker run -v $PWD/ansible:/opt/ansible -v $PWD/ansible/vars/testing:/opt/ansible/vars/private -t dmdirc/ansibletest


Add caching of docker images to CI script.
Add caching of docker images to CI script.
